>
> No, the strawman says => *always* lexically binds |this|. How was it
> unclear? I will fix it.
>
Yes - I understood that. My point (and *I* was probably being unclear -
it's late here on the east coast) was that if you want lexically bound this
for multistatement closures, you can choose
(x) => do { ;;; }
// or
(this = this, x) -> { ;;; }
Both of which are a little heavy. Not bad, though. On the other hand,
this might strike just the right balance:
(x) -> {
this; // lexically bound - yay!
}
In other words, all arrow functions would have lexically bound this, and
the fatness of the arrow would distinguish between blocks and expressions.
This is a departure from CoffeeScript, I realize.
kevin
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss