Block lambda is cool, its syntax isn't

François REMY fremycompany_pub at
Sat Jan 21 13:00:54 PST 2012

> -----Message d'origine----- 
> From: Brendan Eich
> > François REMY <mailto:fremycompany_pub at>
> > January 21, 2012 1:34 AM
> > About the 'fn' proposal, I'm happy with it. Asking a 'use' statement 
> > just for that feature may prove a little excessive but if it can be 
> > merged with other can-be-breaking syntax reforms ('use es6')
> Please read the notes from the tc39 meeting, and the recent threads. We 
> are not requiring version opt-in. New syntax is its own opt-in.
> The problem here is that 'fn' is not "new syntax" without complex parsing 
> hacks. It's an unreserved identifier in ES1-5.

If it's the case, we should avoid that. Avoiding 'use' for the whole syntax 
and requiring it just for 'fn' is weird. But I understand we can't use 'fn' 
per se since it breaks compat. We should try to find something else (it's 
possible, at least).

> > why not. But, seriously, what really makes it impossible to use # or @?
> We've been over this already. # is for freezing, @ is for private names. 
> The Matlab precedent of @ for function is quite weak (thanks for pointing 
> it out).

Yes, but you didn't respond about where @ is used in private name, and why 
it makes the @() syntax ambiguous with that use. Since the @ is never used 
in the private name proposal, I can't check that on my own. My guess is that 
they don't collide.

Anyway, there are still other chars left, we should check if they are easy 
to type on various keyboards (on my keyboard they are): ['6', '~', 'µ', 


(BTW, I got the idea about the un-necessary restriction for out-of-scope {|| 
...}; instead of making them break, you can restrict them) 

More information about the es-discuss mailing list