new instantiation design alternatives
jmar777 at gmail.com
Fri Sep 12 07:35:29 PDT 2014
Sorry to interject, but was the rationale for needing a new syntax for this
(vs. an API-based solution) presented anywhere? I can't seem to find it.
On Fri, Sep 12, 2014 at 10:23 AM, Claude Pache <claude.pache at gmail.com>
> Le 12 sept. 2014 à 15:19, Kevin Smith <zenparsing at gmail.com> 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.
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss