arrow syntax unnecessary and the idea that "function" is too long

Kyle Simpson getify at gmail.com
Mon May 9 02:02:06 PDT 2011


> Let's ignore popularity level for the moment, no other proposal has analog 
> of `=>` which is a solution for a real problem:
>
> var self = this;
> function callback()  {
>    self....
> }

Maybe I missed something, but didn't Brendan's #-function proposal specify 
lexical `this` binding, so that:

function foo() {
   this.bar = "baz";
   return #(x){ this.bar = x; };
}

Isn't that the spirit of what => would give us?

--Kyle




More information about the es-discuss mailing list