David Herman wrote:
On Mar 7, 2012, at 8:09 AM, Brendan Eich wrote:

But ignoring expression bodies, just considering any shorter function syntax 
that starts with ( params ) ..., we will have trouble reaching consensus in 
Ecma TC39. To recap a bit:

 From http://wiki.ecmascript.org/doku.php?id=strawman:arrow_function_syntax

"This cover grammar approach may be future-hostile without, e.g., extending 
guards<http://wiki.ecmascript.org/doku.php?id=strawman:guards>  to be legal in 
expressions."

I'm with Andreas -- don't you have the exact same problem with 
mandatory-identifier? |f(x, y, z)| requires a cover grammar just the same as 
|(x, y, z)| does.

Yes, I did not say an optional identifier in front of ( somehow helps. It doesn't (think I've been clear on that previously; sorry for any confusion above).

My point in reply to Andreas was that making ( expr ) or ( args ) cover ( params ) is a problem if the goal is to reach consensus in TC39.


We could resolve to allow guards in expressions, and get past this one.

Sure. Just checking: is there something about Isaac's proposal (or variations 
on it) that somehow circumvents these issues? If so I'm missing something.

No, I started with "just considering *any* shorter function syntax that starts with ( params )..." on purpose, emphasis added.

We need an introductory keyword or sigil of some kind, not just a random one -- or we need different bracketing (a la block lambdas).

/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to