> On Mar 23, 2015, at 10:42 AM, Jacob Parker <[email protected] 
> <mailto:[email protected]>> wrote:
> 
> 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
>  
> <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,

exactly

> 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 }

what you show above would be an expression bodied "concise method" 
http://people.mozilla.org/~jorendorff/es6-draft.html#sec-method-definitions 
<http://people.mozilla.org/~jorendorff/es6-draft.html#sec-method-definitions> 
That’s a different beast from a FF “expression closure”.

These were consider but not adopted for ES6.  Primarily because they introduced 
grammar, ASI and/or other issues that at the time didn’t see worth trying to 
solve.

Allen


_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to