How to fix the `class` keyword

Kevin Smith zenparsing at gmail.com
Wed Mar 4 18:47:10 UTC 2015


> I have to be honest, there is ONE sticky point to the way classes work
> right now. Why have them throw when called without `new`? The way you
> traditionally guard against needing to rewrite call sites later would be to
> check if this instanceof Constructor in the constructor. I believe this is
> now impossible, correct?
>

Allowing the user to specify the "call" behavior for class constructors is
something to consider for post-ES6.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150304/27c44841/attachment.html>


More information about the es-discuss mailing list