Domenic Denicola wrote:
From: es-discuss [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Brendan 
Eich

>  See Allen's latest followup on this -- is it a static error to have both 
constructor and the static [Symbol.new]() method?

IMO it shouldn't be, because it'd be weird to get an error for `constructor` + `static 
[Symbol.new]()`, but to not get an error for `constructor` + `static [Symbol["n" + 
"ew"]]()` and similar.

Silly me -- strike that "static" before "error" -- it still could be a strict error, but see latest meeting minutes where MarkM changed his position (cited below).

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-.

Still, in this case we have a ClassElement special form, constructor(){}. This distinction adds a choice not present in the ObjectLiteral case: to have a strict (dynamic) error on duplicate Symbol.new-equivalent name.

/be
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to