[Harmony Proxies] Proposal: Property fixing
Mark S. Miller
erights at google.com
Thu Jun 16 22:12:32 PDT 2011
On Thu, Jun 16, 2011 at 9:29 PM, Cameron McCormack <cam at mcc.id.au> wrote:
> Brendan Eich:
> > Read-only and fixed length array subclassing should not require using
> > a proxy to implement the subclass.
> I forgot a requirement: that the array be dense, too.
> > 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).
> How about an array whose values might change, and whose length might
> change, but which must not be allowed to be changed by user script: a
> read only but not fixed length array host object?
> This is essentially the same behaviour as a NodeList, without the
> additional methods on it. So the value of the length property must be
> able to be changed by the implementation. Same for the individual array
> element properties. I don’t think we can get this with regular data
> properties on a native Array object (or a subclass of one).
I agree. Sounds like a proxy. Glad we worked out the configurability issues.
> Cameron McCormack ≝ http://mcc.id.au/
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss