Hacker News new | past | comments | ask | show | jobs | submit login

[deleted]



I just added a note saying that __proto__ is not standard and not supported on IE. Thanks for the comment :)


The note should be much bigger. And __proto__ really isn't "supported" anywhere: it's an implementation detail. It's been deprecated in Mozilla, and Opera used not to have it (as recently as 2009, though there is now an __proto__ property on all objects).

I would recommend a note similar to Dmitry Soshnikov's in his Javascript: The Core: http://dmitrysoshnikov.com/ecmascript/javascript-the-core/#a...

> Let’s take a basic figure of an object with which we will operate in the following descriptions. A prototype of an object is referenced by the internal [[Prototype]] property. However, in figures we will use __<internal-property>__ notation, and in particular for the prototype object: __proto__ (that’s moreover, is a real, but non-standard, implementation in some engines, e.g. SpiderMonkey).

It uses __proto__ but makes quite clear that the property is just an implementation detail of the graphs.


Thanks for the comment. I have added big red (orange...) box to make sure that no one uses __proto__ in real code :)


gah, I saw that so I tried to quickly delete my comment :) Oh well. The deleted comment above just mentioned __proto__ is not standard.


__proto__ is also deprecated and Object.getPrototypeOf should be used instead.


Unfortunately, getPrototypeOf is read only. It does not give an alternative to "new".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: