FWIW, if `Object(Symbol()) instanceof Symbol` is true, and it is, we can say `Symbol` is just an anomaly in the specs because it acts like other primitive constructors but it throws if used as `new Symbol()`.
Developers that would've written `new Symbol` are the same that write `new Boolean` or `new Number` and `new String`. If these people don't put minimal effort to better learn/use the programming language I wonder why the rest of the entire community should be penalised with "quirks" like `Symbol` is. Throw at everything and then, or don't ... and keep it consistent in both good or bad expectations. I know it's too late for `Symbol` but I hope there won't be other inconsistent primitives/classes added to the lang in the future. Best Regards On Mon, Aug 15, 2016 at 12:15 AM, Domenic Denicola <[email protected]> wrote: > Symbol is not a class. > > > > *From:* es-discuss [mailto:[email protected]] *On Behalf Of * > /#!/JoePea > *Sent:* Sunday, August 14, 2016 18:31 > *To:* es-discuss <[email protected]> > *Subject:* Why ES6 introduced classes yet `Symbol` not to be used with > `new`? > > > > It seems like `new Symbol()` would be inline with the introduction of > classes. Why was it chosen not to be constructible? Seems like it would > make sense to throw an error on `Symbol()` but not `new Symbol()`. Was it > to save three characters of typing? > > > */#!/*JoePea > > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss > >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

