Block lambda is cool, its syntax isn't

Brendan Eich brendan at mozilla.com
Fri Jan 20 18:40:40 PST 2012


> Allen Wirfs-Brock <mailto:allen at wirfs-brock.com>
> January 20, 2012 5:41 PM
>
>
>
> At the TC39 meeting we were trying to think of pragma candidates.
>
> It wouldn't surprise me if JS programmer would happily trade one:
>
> use fn;
>
> per file in exchange for being able to use "fn" as a synonym for 
> "function". In terms of character counts, you come out ahead starting 
> with the second function definition.
>
> Allen

I have considered this in the past. It always seemed too little, due to 
return. If it enabled another production:

AssignmentExpression :
     fn Identifier_opt ( FormalParameterList_opt ) AssignmentExpression


(or we just added this unconditionally, without the pragma -- but the 
pragma is good too) then I'd be happy, finally.

/be

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120120/27ae5f44/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: postbox-contact.jpg
Type: image/jpeg
Size: 1287 bytes
Desc: not available
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120120/27ae5f44/attachment.jpg>


More information about the es-discuss mailing list