Le 24/11/2012 14:58, Axel Rauschmayer a écrit :
• MOP changes: Added [[GetInheritance]]/[[SetInheritance]] as
internal methods for accessing [[Prototype]] internal prototype chain.
Why not [[GetPrototype]] and [[SetPrototype]]? We have a absurd
number of excellent resources (including but not limited to Dmitry
Soshnikov and Axel Rauschmayer's websites/blogs) which use
extensively the ES5 internal [[Prototype]]. It's also been very hard
to get people to understand the difference between .prototype and
[[Prototype]]. I'm afraid a new change would create a lot of confusion.
Currently, we have the following inheritance-related terms:
1. [[Prototype]]
2. [[GetInheritance]], [[SetInheritance]]
3. __proto__
4. Object.getPrototypeOf()
The fact that Object.getPrototypeOf retrieves the [[Prototype]] (ES5) or
delegates to [[GetPrototype]] (ES6?) makes sense. I find delegating to
[[GetInheritance]] more debatable.
5. C.prototype
1-4 are closely related, 5 refers to a different concept. I still
welcome any measure to make this terminology easier to understand and
talk about, but I realize that that might not be possible.
As far as ES6 is concerned, it's likely that the 5 form will disappear
because classes will cover most of the basic needs. .prototype will
become useful only for people who know what they're doing.
But ES6 in production is far down the road...
David
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss