Expression Closures as Compliment to Arrow Functions

Jacob Parker jacobparker1992 at
Tue Mar 24 08:58:45 UTC 2015

Either I'm wrong, or that's missing some parens. Assume the following (the
only interpretation I can see to not throw a syntax error),

    var y = (function (a) a ? f : x++)(1);

In which case, that could only return `f`, which when printed should print
the source of f, no?

FWIW, the consise body of arrow functions won't allow the original format,
and must have surrounding parens. Would just allowing consise bodies on
functions work?

I only push for the consise body on functions, as it's easier to understand
why when using this format in object literals, `this` would then not be
lexical, as is the case for arrow functions.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list