On Jun 15, 2011, at 3:53 PM, Mark S. Miller wrote:

> On Wed, Jun 15, 2011 at 2:10 PM, David Bruant <[email protected]> wrote:
> Le 15/06/2011 23:01, Tom Van Cutsem a écrit :
> > Just realized: even though an arrayProxy could update its fixed
> > "length" property, it would not be able to intercept updates "from the
> > outside" (i.e. updates to "length" by objects other than the handler).
> > I guess that capability is also needed to be able to "shrink" an array
> > if its "length" is decreased.
> 
> There's something I don't understand about this whole conversation. Why does 
> our emulated array need to claim that its length property is a 
> non-configurable data property, as opposed to
> * a non-configurable accessor property
> * a configurable data property
> * a configurable accessor property
> ?
Because the ES5 spec. say the length property has attributes: writable: true, 
enumerable: false, configurable: false.  any of the above would be a minor 
variation, but still a variation from the specification.  If you feel 
comfortable with accepting that variation what other variations would you also 
be comfortable with accepting?  What variations would others be comfortable 
with accepting and what if their areas of comfort are different from yours?  
How about a variation that ignores the restrictions on non-configurable Proxy 
properties. 


> There can't be any ES3 code that would be broken by any of these other 
> choices, since ES3 code can't ask about these attributes.
> 

The issue isn't only about Array length or compatibility with existing user 
code.  It is about whether or not Proxies have the power to implement the sort 
of objects that have been created in the past by host objects and 
implementation extensions and even the ESstandard.  What if somebody said,  I 
have this great new system implementation language but it has an limitation 
that prevents it from implementing some features of the ES standard.  Is it ok, 
to just get the implementation as close as I can.  That's what they would 
likely do regardless of what you say, but would you be happy about that?


Allen
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to