A new ES6 draft is available

Brandon Benvie bbenvie at mozilla.com
Mon Sep 30 09:52:38 PDT 2013


On 9/30/2013 4:41 AM, Domenic Denicola wrote:
>> I can't remember any discussion about Object(Symbol()). Why should it be
>> disallowed?
>>
>> On the other hand, we agreed the other week on making 'new Symbol' and
>> Symbol.prototype.toString throw. That should address all likely accidents.
> I only remember Dave briefly mentioning it as one of the potential ways to get a wrapper object; I don't remember a decision to prohibit it.
>
> On the other hand, this is somewhat attractive, as it prevents getting a symbol wrapper object except inside sloppy-mode methods/accessors added to `Symbol.prototype`, wherein `this` is a wrapper. Which means, unless I missed a case, that in strict mode it is impossible to create a symbol wrapper object.

Calling Object as a function is currently infallible and I've seen 
plenty of code that makes this assumption. This should probably not be 
changed.


More information about the es-discuss mailing list