arrow syntax unnecessary and the idea that "function" is too long

Kyle Simpson getify at gmail.com
Tue May 17 17:04:39 PDT 2011


Regarding the -> and => syntax, I just want to throw out one other concern 
that I hope is taken into account, not only now, but for the future: I 
really hope that we don't get to the point where we start adding 
functionality to that style of function that is not available to explicit 
functions (we're almost, but not, there with having => do the magical `this` 
binding).

I know Brendan and others have declared it's "shorthand only", but it can be 
a slippery slope, and to rely on the "if you don't like -> don't use it" 
argument, we have to make sure that it really stays only a shorthand and 
nothing more, otherwise it's tail-wagging-the-dog.

In other words, I hope that those who favor -> aren't also hoping that 
eventually -> replaces `function` entirely. As stated many times thus far in 
this thread, there are still those of us who favor (and maybe always will) 
the explicitness of `function(){}` or `#(){}`.

I'm not saying I think this is likely, I just wanted to make sure I was 
explicit in registering that concern for posterity sake.

--Kyle

 



More information about the es-discuss mailing list