Avoiding overloading the term “prototype”

Axel Rauschmayer axel at rauschma.de
Mon Oct 22 13:17:23 PDT 2012

This probably comes across as being overly obsessed with details, but I think that clear terminology matters. It would be nice if we could avoid the term “prototype” being overloaded in ECMAScript. It still trips up JS beginners: When I explained __proto__ at JSConf, the first question was: “How is __proto__ better than the ‘prototype’ property that all constructors already have?”

How about the following?
- proto (of an obj): the “fallback” object, access via __proto__
- prototype (of a type): value of Constr.prototype

Not entirely happy with this, but it’s better than using the same word twice. And it corresponds to how one would pronounce the property names (modulo “dunder”). If the above is OK then we could rename [[Prototype]] to [[Proto]].


Dr. Axel Rauschmayer
axel at rauschma.de

home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121022/16020912/attachment.html>

More information about the es-discuss mailing list