new instantiation design alternatives

Claude Pache claude.pache at
Fri Sep 12 07:23:03 PDT 2014

Le 12 sept. 2014 à 15:19, Kevin Smith <zenparsing at> a écrit :

> Thanks for this!
> A question:  why is it important to provide this new functionality ("new^", "this = whatever") to basic constructors?  Why not use class syntax as an opt-in to these features?

ES classes are only syntax; the objects defined by that syntax are just regular functions. Basically, these functions could have been defined the traditional way and have their properties related to prototypal inheritance manually adjusted afterwards. It would be artificial to limit a feature based on *how* the objects were constructed.


More information about the es-discuss mailing list