Comment Comment by alunny As I understand it, the main objection to `__proto__` is that it's writable, and thus not atomic with object creation. This creates a bunch of headaches for implementors for performance and security.More knowledgable people than myself discuss it on this es-discuss thread: http://www.mail-archive.com/[email protected]/msg06142....There is a Harmony proposal for a "set prototype of operator" that would solve this problem; instead of writing: var newObj = {__proto__: OldObject, id: 5} You would write: var newObj = OldObject <| { id: 5 } Detailed here: http://wiki.ecmascript.org/doku.php?id=harmony:proto_operato... parent alunny 15 years ago
More knowledgable people than myself discuss it on this es-discuss thread: http://www.mail-archive.com/[email protected]/msg06142....
There is a Harmony proposal for a "set prototype of operator" that would solve this problem; instead of writing:
You would write: Detailed here: http://wiki.ecmascript.org/doku.php?id=harmony:proto_operato...