Avoiding overloading the term “prototype”

Herby Vojčík herby at mailbox.sk
Tue Oct 23 07:55:10 PDT 2012

Axel Rauschmayer wrote:
> It wouldn’t fix the main problem with __proto__: using a property to
> express meta-data. In a way, __proto__ might even be better than, say,
> @proto, because it will be the only property with double underscore,
> highlighting the specialness of that property.

Isn't iterator similar? Array's length also is magical.
> On Twitter, @marcoos correctly commented that changing the name of
> [[Prototype]] (including prototypal inheritance, prototype chain, etc.)
> is too drastic an overhaul. Finding a better name for Constr.prototype
> seems easier.

Well, Constr.prototype is the much nearer to obvious meaning of the word 
prototype than is [[Prototype]] (though "blueprint", "skeleton" etc. 
seems to be a little more appropriate, but the difference is not that 
big). Letting [[Prototype]] called prototype and renaming 
Constr.ptototype is against common logic (imho).

Prototypal inheritance is ok, since this is the term often used for 
classless, object-to-object inheritance (or, maybe just JS made them 

But if only one should be renamed, I'd argue for [[Prototype]] (and so 
prototype chain would need to be renamed, too; to plain inheritance 
chain, for example (goes well with [[Parent]] as well as [[Ancestor]])).

> Axel


More information about the es-discuss mailing list