Block lambda is cool, its syntax isn't

Jorge jorge at jorgechamorro.com
Fri Jan 20 18:46:41 PST 2012


On 20/01/2012, at 19:17, Brendan Eich wrote:
>> Jorge <mailto:jorge at jorgechamorro.com> January 20, 2012 1:22 AM
>> 
>> Has a backtick/accent grave ever been considered and/or rejected ?
>> 
>> Anonymous function expression:
>> 
>> setTimeout( `(){ ... }, 1e3);
>> 
>> Named function expression:
>> 
>> setTimeout( `name(){ ... }, 1e3);
>> 
>> Declarations:
>> 
>> `(){ ... } // error: can't declare anonymous functions
>> 
>> `name(){ ... }
> 
> Rejected, that is used by wiki.ecmascript.org/doku.php?id=harmony:quasis already.



1.- There are not quasi literals in the language yet
2.- quasi literals could as well use something else (the acute accent ?) instead
3.- a shorter function syntax is almost at the top in the programmers' wish list for ES.next (unlike quasis)

Isn't it -perhaps- too soon to reject ` for functions in favor of quasis ?
-- 
Jorge.


More information about the es-discuss mailing list