Andreas Rossberg (2013-04-22T13:22:24.000Z)
github at esdiscuss.org (2013-07-12T02:26:57.267Z)
I have difficulties catching up with everything that has been said in this thread, my apologies if I repeat parts of the discussion. Here is what I thought we agreed upon earlier: 1. `__proto__` is an accessor property on `Object.prototype` 2. reflecting it via `Object.getOwnPropertyDescriptor` gives you a poisoned setter 3. `__proto__` can be deleted from `Object.prototype` 4. `__proto__` in object literals is a special piece of syntax independent from (1) I think this all makes sense, and we are working towards making V8 implement this. (3) implies that `Object.prototype.__proto__` is configurable, which should also imply that you can just remove the setter, not the getter, which I believe addresses Alex' initial request. The main question I still had was what "poisoning" means. Currently, V8 simply returns an always-throw function. Others (e.g. Brendan) seemed to assume that we only poison sets for other realms. However, in that case, I actually think that there is no need to have any special poisoning semantics when reflecting `__proto__` -- mainly because the cross-realm check is already necessary in the unreflected case: you can construct an object o in realm A with an `Object.prototype` from another realm B on its proto chain. If you deleted `__proto__` on realm's A `Object.prototype`, I don't think it should still be possible to assign to `o.__proto__`, should it? If that's so then there is absolutely nothing magic remaining about `__proto__` as a property. As for `__proto__` in object literals, I definitely agree with Allen and Mark that this should be special syntax, and not dependent on `Object.prototype.___proto__`, for the reasons mentioned. Whether a difference should be made between quoted and unquoted I don't know, I must have missed the rationale for such a move.