Allen's lambda syntax proposal

Brendan Eich brendan at mozilla.com
Mon Dec 1 15:58:48 PST 2008


On Dec 1, 2008, at 3:47 PM, Felix wrote:

> @ is unused
>   @(a, b, c){}

@ is already used by ECMA-357 (E4X). Also some tradition of denoting  
dereference (Cyclone, managed C++ IIRC).

Hard to beat \ if we want the parenthesized formal parameter list in  
front.

/be

>
>
> Douglas Crockford wrote:
>> Allen Wirfs-Brock wrote:
>>> {|a,b,c| ...} or
>>> \(a,b,c) {...} or
>>> {\(a,b,c) ...}
>>> The use of \ slightly bothers me because it is takes a character
>> > that now is exclusively used in the lexical (token) grammar
>> >( Unicode escapes, string escapes, line continuations)
>> > and gives it syntactic significance. This is probably not a
>> >fatal flaw but it would mean that the lexical uses of \ become less
>> >visually distinctive.
>> The language overuses / recklessly, and still it didn't die.
>> I suppose it could survive the overuse of \ as well.
>> Is recursion still desirable in this form. If so, then of the three  
>> I like
>>    \(a,b,c) {}
>> because you can think of the \ as being an abbreviation of function.
>>    \ name(a,b,c) {}
>> Just don't start your function name with u.
>> _______________________________________________
>> Es-discuss mailing list
>> Es-discuss at mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss
> _______________________________________________
> Es-discuss mailing list
> Es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss



More information about the Es-discuss mailing list