Allen Wirfs-Brock (2013-04-21T18:20:44.000Z)
github at esdiscuss.org (2013-07-12T02:26:54.474Z)
On Apr 21, 2013, at 10:03 AM, Brendan Eich wrote: > Allen Wirfs-Brock wrote: >> I still think that Dunder proto should not be exposed at all by `Object.getOwnPropertyDescriptor` (or any other reflection) and that there is no need to leak either a working or always throwing `__proto__` setter function into the hands of a ES programmer. > > This isn't what we seemed to agree on at past TC39 meetings. > > It's also not what the engines trying to converge on ES6 semantics have implemented. It's not clear to me, yet what convergence we actually have. Regardless, it's only observable via `Object.getOwnPropertyDescriptor(Object.prototype, "__proto__")` which in my proposal returns undefined when Dunder proto is active and in other proposals returns a function that when evaluated throws something. The semantics of Dunder proto that have been discussed isn't just that of an accessor property and can't be purely implemented as such so I no value in trying to masquerade it as an accessor for `getOwnPropertyDescriptor`. Returning get/set functions that always throws is just adding complexity that delivers no value.