Does the [[Overridable]] you have in mind also fix the override mistake? It sounds like it should.
Regarding shadowable, is there any better documentation than the doc-comment: /* * For ES5 compatibility, we allow properties with PropertyOp-flavored * setters to be shadowed when set. The "own" property thereby created in * the directly referenced object will have the same getter and setter as * the prototype property. See bug 552432. */ Is there any observable effect of shadowable? Example? On Wed, Oct 1, 2014 at 11:50 AM, Brendan Eich <[email protected]> wrote: > Claude Pache wrote: > >> The more I consider the issue, the more I think that the most elegant >> solution is to complete data properties with an additional "overridable" >> attribute, whose purpose is to refine the meaning of the "writable" >> attribute in the manner sketched below (in opposition of having an >> @@unscopables-like hack). >> > > A new attribute, per property, is safer in general (backward > compatibility) than a per-object flag. A per-object list seems an obtuse > way to encode an attribute, and I am quite sure implementations would > prefer an attribute. > > At first glance, I expect that the addition of such an attribute should >> not trigger much BC issues, but that needs to be examined more closely. >> > > If it's opt-in, e.g. we define Array.prototype.contains with > [[Overridable]] among its attributes, then at least MooTools works. > > What could break? Code that did not expect 'contains' to exist on > Array.prototype, but did expect assigning to someArray.contains would make > a non-enumerable and/or non-own property. That would seem like nonsense or > broken code, but it could exist for some name and prototypal relation, > you're right. > > Only way to find out is to implement and test at scale. > > It would be good to hear from implementors on the idea of an > [[Overridable]] attribute. SpiderMonkey has something similar but more > restricted (see http://dxr.mozilla.org/mozilla-central/source/js/src/ > vm/Shape.h?from=SHADOWABLE&case=true#1013). > > /be > -- Cheers, --MarkM
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

