A new ES6 draft is available

Andreas Rossberg rossberg at google.com
Mon Sep 30 04:53:24 PDT 2013

On 30 September 2013 13:41, Domenic Denicola
<domenic at domenicdenicola.com> wrote:
> From: es-discuss [mailto:es-discuss-bounces at mozilla.org] On Behalf Of
>> 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.

Yes, but there seems nothing inherently risky or error-prone in
(purposefully and explicitly) creating a wrapper object. And since you
can do it for other primitive types, I think the scales weigh towards
consistency on this one.


More information about the es-discuss mailing list