Expression Closures as Compliment to Arrow Functions

Jacob Parker jacobparker1992 at gmail.com
Mon Mar 23 09:42:19 UTC 2015


I noticed expression closures, as defined below, have been excluded from
the spec.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Expression_closures

Currently implemented (and deprecated) in Firefox, which hasn't broken
anything by the looks of things.

While offering little above arrow functions, including these, in addition
to the existing shorthand syntaxes, should make the following examples work.

    var x = { value: 3, toString() 'string', valueOf() this.value };

    class x { constructor { this.value = 3; } valueOf() this.value }

Was there reasoning to not include them?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150323/9aa0e1a2/attachment-0001.html>


More information about the es-discuss mailing list