arrow function syntax simplified
Brendan Eich
brendan at mozilla.com
Tue Mar 27 19:01:44 PDT 2012
Luke Hoban wrote:
> I actually think it's worth starting simple here (maximal minimalism again). There is a lot of value in just having shorthand for exactly what 'function' is used fortoday. Only statement bodies, no lexical this, nothing fancy for nullary parameter lists. That alone would be a huge win, and would add effectively no additional complexity/concept count.
Kevin's analysis contradicts your assertion. Expression-bodied functions
with bound |this| (or var self=this outside) predominate in the code he
surveyed.
/be
More information about the es-discuss
mailing list