Andrea Giammarchi <mailto:andrea.giammar...@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?

https://mail.mozilla.org/pipermail/es-discuss/2012-March/021873.html

quoting:

"""

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 });

kevin

"""

This is based on Kevin Smith's quantitative study:

https://mail.mozilla.org/pipermail/es-discuss/2012-March/021126.html

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

https://mail.mozilla.org/pipermail/es-discuss/2012-March/021875.html

a followup from me to the notes:

https://mail.mozilla.org/pipermail/es-discuss/2012-March/021872.html

/be
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to