arrow function syntax simplified

Kevin Smith khs4473 at gmail.com
Wed Mar 28 18:21:02 PDT 2012


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120328/541e41d5/attachment.html>


More information about the es-discuss mailing list