Allen's lambda syntax proposal

Eric Suen eric.suen.tech at gmail.com
Sat Dec 6 01:03:45 PST 2008


This is ambiguous

{(a, b)
a + b}

is

{(a,b);
a+b
}

unless use no line break restrict and it is difficult to parse

>P T Withington wrote:
>> Would it work to move the parameter list inside the block (as in the
>> Smalltalk way, but as a regular parameter list, not using ||'s)?
>>
>>   {(a, b) a + b}
>>
>> AFAICT, `{(` is a syntax error for an expression in es3.
>
> I think this is unambiguous, but I don't like it because it has no
> symbol or combination of symbols that is specific to a lambda.
> ( "{(" can occur as the start of a block.)
>
> -- 
> David-Sarah Hopwood 




More information about the Es-discuss mailing list