On Jul 26, 2013, at 8:50 AM, Domenic Denicola <[email protected]> 
wrote:

> Why do arrow functions require a parameter list and a body? That is, none of 
> the following are allowed:
> 
> - `=> foo`

I guess this could be lexically unambiguous, but i'm unconvinced that the "win" 
of losing two characters in the strictly less common no parameters is worth the 
syntactic confusion

> - `bar =>`
> - `=>`

I think an optional tail would be a huge coding hazard - a typo could result in 
bizarre behaviour, take:

blah(=>,5)

vs

blah(=>5)


> 
> Instead you need the more-verbose
> 
> - `() => foo`

Honestly I'm not sold on the {} free production, but i understand the arguments 
for it.  Randomly (and because i'm too lazy to check) how would
a => b => c

produce?  I mean aside from making the maintainers cry.


--Oliver

> - `bar => {}`
> - `() => {}`
> 
> Any chance of relaxing this a bit?
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss

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

Reply via email to