block lambda revival

Brendan Eich brendan at mozilla.com
Mon May 23 18:24:47 PDT 2011


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
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110523/08885965/attachment-0001.html>


More information about the es-discuss mailing list