On Tue, Mar 27, 2012 at 3:43 PM, Brendan Eich <[email protected]> wrote:
> http://wiki.ecmascript.org/**doku.php?id=strawman:arrow_**function_syntax<http://wiki.ecmascript.org/doku.php?id=strawman:arrow_function_syntax> > > Use => only with an expression body (do-expressions if accepted allow > statements and combined with => compete with block-lambdas). > > Use -> only with body block, as for long-form function. > Just a thought - if a block is required on the RHS of the ->, why not just skip the arrow? I could be mistaken, but would it be just as easy grammatically to do: array.forEach((v, i) { if (i & 1) oddArray[i >>> 1] = v; }); instead of: array.forEach((v, i) -> { if (i & 1) oddArray[i >>> 1] = v; }); This way, there would only be one kind of arrow. Without an arrow its basically just removing the keyword function, and therefore maybe a little bit easier to transition. With the arrow added, you can expect a bigger jump in semantics. - Russ > > I deferred other accretions. > > In a rush here, comments and corrections welcome and I'll edit as I can. > > /be > ______________________________**_________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/**listinfo/es-discuss<https://mail.mozilla.org/listinfo/es-discuss> >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

