[Harmony Proxies] Proposal: Property fixing

Brendan Eich brendan at mozilla.com
Thu Jun 16 23:31:34 PDT 2011


On Jun 16, 2011, at 10:12 PM, Mark S. Miller wrote:

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

Yes, NodeList requires Proxy.


> I agree. Sounds like a proxy. Glad we worked out the configurability issues.

Assuming Tom's fixed properties proposal (the latest) is approvied -- right?

/be

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110616/8666b9a3/attachment.html>


More information about the es-discuss mailing list