Comments on “Making Built-in Objects Subclassable”

Axel Rauschmayer axel at
Mon Mar 18 04:33:46 PDT 2013

A few more thoughts:

- This marks the end of prototypal inheritance in JavaScript (not complaining, just stating a fact). Putting @@create in constructors C makes a lot of sense, but it could, in principle, also be put into instance prototypes C.prototype. Then Object.create(proto) could use @@create to create the instance whose prototype is proto.

- I would love to have a @@postConstruct method (similar to @@create) that is invoked after all constructors are done with initialization. Use case: freeze an instance or make it non-extensible.

- Slide 24: marking objects as initialized in the root of a class hierarchy looks suspicious to me (the constructors are not done initializing, yet!). Doing it in something like @@postCreate might make more sense.


Dr. Axel Rauschmayer
axel at


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list