How to fix the `class` keyword
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...
More information about the es-discuss