Will any new features be tied to constructors?

Anne van Kesteren annevk at annevk.nl
Tue Jun 30 16:54:51 UTC 2015

On Tue, Jun 30, 2015 at 6:41 PM, Kevin Smith <zenparsing at gmail.com> wrote:
> Changes the prototype dynamically?  We're generally moving away from such
> shenanigans.
> That would indeed interact poorly with some of the designs for private state
> that we've been entertaining.  In such a scheme private state "slots" are
> allocated when the object is created.  But in your use case you wouldn't
> know what slots to allocate until after you've created the object.  And then
> it's too late.

Right, my personal preference is to just use constructors. That
however has two drawbacks:

1) Leaves upgrading nodes up to the developer. Or requires them to
load script synchronously, blocking the parser. Neither is
particularly great.
2) Would allow JavaScript to run while cloning nodes (needed for
various editing operations and printing in some browsers) would be a
pain as the C++ algorithms are not prepared for it. Very much unclear
if that's feasible within any reasonable amount of time.


More information about the es-discuss mailing list