Allen's lambda syntax proposal
Maciej Stachowiak
mjs at apple.com
Wed Dec 3 18:18:15 PST 2008
On Dec 3, 2008, at 1:23 PM, Peter Michaux wrote:
> Summary of what I've read:
>
> The syntax \(){} has a named lambda problem if the lambda name starts
> with a 'u'. Depending on whitespace between the backslash and the
> identifier seems like it will cause bugs
>
> \u03c0(){}
> \ u03c0(){}
>
> The syntax ^(){} has a semicolon insertion ambiguity. What does the
> following mean?
>
> x = x
> ^(){}
I think this has only one possible meaning: an expression statement
consisting of an assignment of x to itself, followed by an expression
statement that creates an empty no-argument closure. Do you see
another possible meaning?
More generally, I can imagine cases that might actually be ambiguous
but I think they can be fixed in the same way that this is:
x = x
+x
Regards,
Maciej
More information about the Es-discuss
mailing list