what kind of problem is this fat arrow feature trying to solve ?

Brendan Eich brendan at mozilla.com
Wed Oct 2 15:29:41 PDT 2013

> Andrea Giammarchi <mailto:andrea.giammarchi at gmail.com>
> October 2, 2013 2:25 PM
> Thanks. And do "we" know which one is the most common case or any 
> reason we won't have the same in ES6 ? I see both options as a win. 
> Having only the => version looks like a huge limit in arrow potential.

We went through the case analysis here, perhaps you missed it?




If the consensus is that two arrows are too confusing, and we must choose
to prefer either object literal or blocks, then the code I sampled suggests
that object literals as expression bodies are rather uncommon (only 16 out
of 5705 BTF candidates, or 0.2%).

     // Not so bad...
     x =>  ({ a: 123 });



This is based on Kevin Smith's quantitative study:


Please study carefully!

As noted many times, going back to the March 2012 meeting, we also 
talked about -> but some on TC39 view it as "an arrow too far". See


a followup from me to the notes:



More information about the es-discuss mailing list