On Jun 16, 2011, at 8:58 PM, Cameron McCormack wrote: > Mark S. Miller: >> Although >> <http://wiki.ecmascript.org/doku.php?id=strawman:proto_operator> >> still appears in "strawman", I believe we accepted its functionality >> (with concrete syntax still TBD) into ES-next "proposal" status, so >> it will become standard at the same time proxies will. Of course, the >> current WebIDL JS binding is targeting ES5 and so cannot directly rely >> on either proxies or "<|". But perhaps we should choose an ES5 host >> behavior for array host objects that anticipates reimplementing them >> using "<|" rather than proxies in the ES-next timeframe? Perhaps we >> should choose an ES5 behavior that leaves both future choices open? It >> sounds like we're already either there or almost there. > > Maybe I was too eager: I guess subclassing array objects in this way > wouldn’t let us define arrays that are read only, or fixed length, or > whose values could be changed by the implementation at any time. Is > that right? If so, maybe array subclassing isn’t what we want here, and > using proxies with the Array prototype object in the prototype chain is > the way to go.
Read-only and fixed length array subclassing should not require using a proxy to implement the subclass. The value changing at any time should be ok as long as length is writable. Non-writable length value should not change (assuming non-configurable -- if configurable then reconfiguring to writable would allow new values to be put). /be _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

