(x) => {foo: bar}
Brendan Eich
brendan at mozilla.org
Tue Jan 6 15:57:39 PST 2015
Dean Landolt wrote:
> On Tue, Jan 6, 2015 at 3:57 PM, Marius Gundersen <gundersen at gmail.com
> <mailto:gundersen at gmail.com>> wrote:
>
> I don't see how wellLabeledStatement will protect against object
> literals with shorthand properties, like (x, y, z) => {x, y, z}.
>
>
> It would "protect" against them by disallowing them without the paren
> wrapping. A fail-fast SyntaxError beats the hell out of trying to
> diagnose an almost imperceptible runtime bug.
No, Marius has a point here: there's no LABEL: before anything in {x, y, z}.
/be
More information about the es-discuss
mailing list