Duplicate property names (was Re: @@new)

Erik Arvidsson erik.arvidsson at gmail.com
Thu Jun 19 07:47:26 PDT 2014

On Wed, Jun 18, 2014 at 12:07 AM, Brendan Eich <brendan at mozilla.org> wrote:

> Domenic Denicola wrote:
>> Another way of guiding the decision: I don't quite recall where the spec
>> landed `{ x: 1, ["x"]: 2 }`, but we should probably be consistent with that.
> *Mark Miller:* I am ok with removing the constraint that duplicate dynamic
> object properties throw (in strict mode) with the caveat that we also
> remove the same constraint for duplicate static properties.
> from http://esdiscuss.org/notes/2014-06-06#rest-properties-
> and-spread-properties-sebastian-markb-ge-.


- For both strict and sloppy object literals, both computed and static
properties no longer have any duplicate name checking.

I would like this the above to be clarified.

At the f2f we were talking about spread in object literals.

var a = {x: 1, y: 2};
var b = {x: 3, ...a};

However, reading the notes the context is lost and it seems like we are
suggestion removing the duplicate property check added in ES5 for strict

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140619/1bc0a897/attachment.html>

More information about the es-discuss mailing list