Any suggestion for improvement is highly welcome. But it seems like we can’t do better than a construct that declares statically, how its `this` should be passed to it. The cool thing about block lambdas is that you do the right thing without thinking about it. That’s why, if we got arrow syntax instead, I would opt for only having the fat arrow (given that we already have a shorter syntax for methods inside object literals).
I wonder if it made a difference if `this`was always stored in an environment (instead of an execution context). Then block lambdas could find them via the scope chain. On Nov 10, 2011, at 15:11 , Andreas Rossberg wrote: > On 10 November 2011 14:49, Axel Rauschmayer <a...@rauschma.de> wrote: >> getX() is designed for a dynamic `this` (i.e. `this` is an instance of >> InnerPoint). My proposal would allow an external party to switch to lexical >> `this` (=== function Outer), simply by invoking it as a (non-method) >> function. I can see how this would be bad. > > Ah, OK, never mind. I think I was actually misreading your proposal. -- Dr. Axel Rauschmayer a...@rauschma.de home: rauschma.de twitter: twitter.com/rauschma blog: 2ality.com
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss