Why ES6 introduced classes yet `Symbol` not to be used with `new`?
d at domenic.me
Sun Aug 14 23:15:11 UTC 2016
Symbol is not a class.
From: es-discuss [mailto:es-discuss-bounces at mozilla.org] On Behalf Of /#!/JoePea
Sent: Sunday, August 14, 2016 18:31
To: es-discuss <es-discuss at mozilla.org>
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?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss