domenic at domenicdenicola.com (2014-06-27T19:00:50.044Z)
On Wed 25 Jun 2014 17:09, Erik Arvidsson <erik.arvidsson at gmail.com> writes:
> Other combinations set an own property [...] Combining these leads to
> confusing code (so don't do that) but the semantics is clear.
I'm glad that the semantics are clear to you ;-)) The tricky case is not
`__proto__` in isolation; it's how it interacts with other defined
properties. Particularly, from my mail:
> ({ get __proto__() {}, __proto__: foo, set __proto__(x) {} })
>
> Does the resulting accessor have a setter and a getter, or just a
> setter?
What do you think should happen in this case?
On Wed 25 Jun 2014 17:09, Erik Arvidsson <erik.arvidsson at gmail.com> writes: > If I recall correctly the intent was that __proto__ was special syntax > for setting the [[Prototype]]. So only three following cases are setting > the [[Prototype]] > > {__proto__: object} > {'__proto__': object} > {"__proto__": object} > > Other combinations set an own property [...] Combining these leads to > confusing code (so don't do that) but the semantics is clear. I'm glad that the semantics are clear to you ;-)) The tricky case is not __proto__ in isolation; it's how it interacts with other defined properties. Particularly, from my mail: > ({ get __proto__() {}, __proto__: foo, set __proto__(x) {} }) > > Does the resulting accessor have a setter and a getter, or just a > setter? What do you think should happen in this case? Andy