On May 23, 2011, at 6:09 PM, Brendan Eich wrote:
> 2. Parse as proposed but with the restriction that the last block-lambda
> argument "ends the line",
Where "ends the line" means either ; or LineTerminator (ignoring spaces
including comments that do not include line terminators), I suppose. Ugh. #1
looks better, but it could be misread as currying:
bar = foo({|x| x * x})(42);
I should have listed
0. A simpler change: allow only one block-lambda argument in the paren-free
call case. This may be enough for now.
/be
> and also parse a mixture of block-lambda expressions and
> assignment-expressions separated by commas. IOW, parse both
>
> bar = foo {|x| x * x} {| | 42}
>
> and
>
> bar = foo {|x| x * x}, 42;
>
> /be
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss