Allen's lambda syntax proposal

Douglas Crockford douglas at
Mon Dec 1 15:34:58 PST 2008

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.

More information about the Es-discuss mailing list