On Monday, 2011-05-09 at 11:02 , Kyle Simpson wrote: 
> 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?
> 
Yes and this case makes following example extremely confusing:

MyObject.prototype.bar = #(x) { this.bar = x }

Is this instance of MyObject ? So we need to use `#` in some places, but in 
other cases we need to stick to long form `function`. I think `->` and `=>` is 
way more intuitive and simple. 
> --Kyle
> 
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to