Brendan Eich wrote:
Mark Volkmann wrote:
My apologies. I meant to say that Traceur doesn't support returning a
literal object from an arrow function with syntax like this:

let f = x => ({foo: bar});

However, I just tested it again and it works fine. I could swear this
didn't work a few months ago. Maybe it was fixed recently. I'm happy!

Cool -- you are supporting Caitlin's thesis that we can pedagogue around
the footgun. I hope so.

Still leaves
http://wiki.ecmascript.org/doku.php?id=strawman:block_vs_object_literal
as an option for ES7. Comments welcome.

A crazy idea:

(a, b) { body }
(a, b) => expr /* always expr context */

the only problem I quickly see is to distiguish (a) { body }, but IMHO there is the same lookahead need for distiguishing (a) => something today.

/be

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

Reply via email to