Will any new features be tied to constructors?

Kevin Smith zenparsing at gmail.com
Wed Jul 1 13:04:16 UTC 2015


>
> The essence of Dmitry's design is to disallow custom allocation, while
> allowing custom initialization. This allows you to optionally decouple the
> two stages when necessary (upgrades, cloning, etc.) while also getting the
> goodness where author code doing `new MyElement(...)` calls both built-in
> allocation and custom initialization immediately.
>

If we go with a private state design where the internal slots are not
dynamic, but fixed at birth (which is where we'd like to go), then a
"becomes-like" solution for custom elements wouldn't be compatible with
it.  It would mean that custom elements wouldn't be able to have usable
private slots.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150701/a1a3ba30/attachment.html>


More information about the es-discuss mailing list