Agreeing on user-defined unique symbols?

Brandon Benvie bbenvie at mozilla.com
Fri Aug 2 13:28:48 PDT 2013


On 8/2/2013 1:21 PM, Tab Atkins Jr. wrote:
> On Fri, Aug 2, 2013 at 12:45 PM, Kevin Smith <zenparsing at gmail.com> wrote:
>>      class C {
>>          "sys/iterator"() { }
>>          "foo/userDefined"() { }
>>      }
> How do you distinguish these from plain strings?  Or are you not
> distinguishing them, and just assuming that we add a way to use string
> literals as method names?

I think he's saying they would just be plain strings. With current 
plans, you'd have to do

```js
class C {
   ["sys/iterator"]() {}
}
```

But I could see allowing string literals in property names.


More information about the es-discuss mailing list