simple shorter function syntax

Maciej Stachowiak mjs at apple.com
Sun Jul 25 18:49:52 PDT 2010


On Jul 25, 2010, at 4:57 PM, Maciej Stachowiak wrote:

> 
> Perhaps the strawman page for shorter function syntax should list reasons for rejecting other syntax options. I would be happy to document the reasons against fn, fun, f and \, but I can't seem to remember my username and password (I'm not even sure if I have an account). Who can help with wiki access issues?

I documented the alternate proposals and known problems if any here:

http://wiki.ecmascript.org/doku.php?id=strawman:shorter_function_syntax#alternate_syntax_proposals

For the Ruby-like syntax, I was not sure what the zero-argument case would look like.

Would it be like this:

[0, 1, 2, 3].map({|| x * x})

Or like this:

[0, 1, 2, 3].map({x * x})

The former looks ugly to me and the latter may create parser difficulties.

Regards,
Maciej



More information about the es-discuss mailing list