Expression Closures as Compliment to Arrow Functions

Brendan Eich brendan at mozilla.org
Wed Mar 25 08:37:17 UTC 2015


Jacob Parker wrote:
> In the context of only objects and classes, is this format no-go?

Without the } that closes a concise method body, there's a new problem 
to-do with computed property names:

class C {
   m() this._m
   [Symbol.iterator]() {/*...*/}
}

We need a delimiter. Could use ; without ASI, so it'd look like this:

class C {
   m() this._m;
   [Symbol.iterator]() {/*...*/}
}

I haven't checked for other problems, but wanted to throw this out and 
see if anyone else sees a live one.

/be


More information about the es-discuss mailing list