Introduction, comprehensions beyond arrays

Brendan Eich brendan at
Fri May 10 12:06:16 PDT 2013

Allen Wirfs-Brock wrote:
> We previously explored having lambdas expressions that included 
> support abnormal exits, including method level returns. I even did 
> most of the spec. work that would be needed to define them. But the 
> ultimate consensus was formed around arrow functions without such 
> control escapes.

And the reason (just to catch people up) was that JS has statements, the 
C curse, and so it's too late to graft full TCP on. In arrow function 
bodies, we have as much as TCP we can mix in at this late date, namely, 
in expressions: this, super, I expect arguments.

>> Separately, for the list: are arrow-functions lexically transparent 
>> to super and arguments? I hope so! For this kind of desugaring, if 
>> nothing else.
> super is lexically resolved through the defining method so, just like 
> this, it isn't rebound within an arrow function.  Follow the spec. 
> logic starting in 11.2.4.


> I see that I have a TODO note in 10.5.3 that says "don't create an 
> arguments binding for arrow functions".  However, I'm not sure that we 
> actually had consensus on that point.

We never had an alternative that I know of. The wiki went further and 
said 'arguments' is an error; this was based on meeting feedback.

>  I'm with you on in thinking that  arrows shouldn't rebind arguments 
> but I think there may have been some push back on that.

No one wants arguments in arrows.

The question is, should an outer arguments binding be visible? I think 
so, now that Jason raises the question.


More information about the es-discuss mailing list