block-lambda revival

Axel Rauschmayer axel at rauschma.de
Thu Jun 23 23:33:01 PDT 2011


> From: Brendan Eich <brendan at mozilla.com>
> Date: June 24, 2011 7:00:39 GMT+02:00
> Subject: Re: block-lambda revival

> However, I recall from the last TC39 meeting that some folks on the committee seemed outraged that block lambda revival (because of TCP conformance -- no way around this) lexically binds 'this', always. I believe the problem they had was that they believed shorter function syntax should be neutral on 'this' binding, to make functions in all their current use-cases more convenient.

I take it their complaint was *not* about performance? I would think that block lambdas would not use a function + bind to achieve lexical this, but some kind of variable renaming/alpha conversion. Thus, performance should not be an anti-lambda argument. On the other hand, |this| not being stored in an environment, alpha conversion might not work (move |this| from the Execution Context State to an the environment???).

> This is a difference in risk evaluation or tolerance, perhaps. We should try to get to the bottom of it.


Maybe there should be a list of “functions in all their current use-cases”. I keep thinking that dynamic |this| only matters for methods, but you provided a counter-example.

-- 
Dr. Axel Rauschmayer

axel at rauschma.de
twitter.com/rauschma

home: rauschma.de
blog: 2ality.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110624/94fde69f/attachment.html>


More information about the es-discuss mailing list