Readdition of __proto__

Dean Landolt dean at deanlandolt.com
Tue Oct 15 15:19:59 PDT 2013


On Tue, Oct 15, 2013 at 5:50 PM, Brendan Eich <brendan at mozilla.com> wrote:

> Benjamin (Inglor) Gruenbaum wrote:
>
>> Not resolving this like o3 (or o6 really) sounds very strange. I think:
>>
>> let attr = "__proto__";
>> let o7 = new Object;
>> o7[attr] = p; // o7 inherits from p
>>
>> Is the correct behavior here (why would it not invoke the setter?)
>>
>
> Allen confirmed, but just to be clear, any world where o["foo"] and do {
> let key = "foo"; o[key]; } (do-expression syntax from harmony-era strawman)
> differ is crazytown, and we do not go there.
>

True, but the __proto__ train left the station bound for crazytown long
ago...

So just to be clear, the only way to add a __proto__ property to an
existing object is with Object.defineProperty?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20131015/981ef93e/attachment.html>


More information about the es-discuss mailing list