Duplicate property names (was Re: @@new)

Andy Wingo wingo at igalia.com
Wed Jun 25 08:18:59 PDT 2014

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?


More information about the es-discuss mailing list