On 11/05/2011, at 18:53, Brendan Eich wrote:
> (...)
>
> 3c. The use of {| (possibly with space in between) is an unambiguous
> extension, but formal parameters inside |...| delimiters creates a problem
> for http://wiki.ecmascript.org/doku.php?id=harmony:parameter_default_values.
> We would need the default value expression to be parenthesized if its
> precedence were | (bitwise-or) or looser.
I don't think it's a problem, after all that's what parenthesis are for.
> Other than these, AFAICT blocks as lambdas offering shorter function-like
> syntax are pretty good.
Yes, [ ... ].forEach( {| v, i, o | ... } ) would be awesome, and {| n | while
(n--) buffer[n]= 0 }( buffer.length ) is even beautiful.
> Should we reconsider them?
Yes. Ruby's blocks, pure win. :-)
--
Jorge.
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss