forbes at lindesay.co.uk (2015-11-12T15:37:16.971Z)
Considering the proposals for both concise methods and the bind operator I
think it would be a great addition to be able to use them together.
I am already seeing a lot of this:
```js
class Foo {
bar = () => {
// bound
}
buz() {
// unbound
}
}
```
I think having the bind operator with a concise method makes things more
uniform:
```js
class Foo {
::bar() {
// bound
}
buz() {
// unbound
}
}
```
This would also allow for this to be using on object literals:
```js
let foo = {
::bar() {
// bound
}
buz() {
// unbound
}
}
```
This would also make using recursion with concise functions feasible:
```js
let fibonacci = {
::at(n) {
if (n < 2) {
return n;
}
return this.at(n-1) + this.at(n-2);
}
}
fibonacci.at(7); // 13
```
I am looking for a champion for this feature. Anybody interested?forbes at lindesay.co.uk (2015-11-12T15:36:59.506Z)
Considering the proposals for both concise methods and the bind operator I
think it would be a great addition to be able to use them together.
I am already seeing a lot of this:
```js
class Foo {
bar = () => {
// bound
}
buz() {
// unbound
}
}
```
I think having the bind operator with a concise method makes things more
uniform:
```js
class Foo {
::bar() {
// bound
}
buz() {
// unbound
}
}
```
This would also allow for this to be using on object literals:
```js
let foo = {
::bar() {
// bound
}
buz() {
// unbound
}
}
```
This would also make using recursion with concise functions feasible:
```js
let fibonacci = {
::at(n) {
if (n < 2) {
return n;
}
return this.at(n-1) + this.at(n-2);
}
}
fibonacci.at(7); // 13
```js
I am looking for a champion for this feature. Anybody interested?
Considering the proposals for both concise methods and the bind operator I think it would be a great addition to be able to use them together. I am already seeing a lot of this: class Foo { bar = () => { // bound } buz() { // unbound } } I think having the bind operator with a concise method makes things more uniform: class Foo { ::bar() { // bound } buz() { // unbound } } This would also allow for this to be using on object literals: let foo = { ::bar() { // bound } buz() { // unbound } } This would also make using recursion with concise functions feasible: let fibonacci = { ::at(n) { if (n < 2) { return n; } return this.at(n-1) + this.at(n-2); } } fibonacci.at(7); // 13 I am looking for a champion for this feature. Anybody interested? Thanks, JD Isaacks -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20151109/68f2cb82/attachment-0001.html>