On May 18, 2011, at 7:45 AM, Mark S. Miller wrote:

> On Wed, May 18, 2011 at 7:38 AM, Brendan Eich <[email protected]> wrote:
> On May 18, 2011, at 7:28 AM, Tom Van Cutsem wrote:
> 
> > Proxies do coerce all property names to strings, e.g. proxy[obj] will 
> > trigger the 'get' trap with 'obj' coerced to a String. This is not actually 
> > enforced by the proxy spec, but rather by ES5 (e.g. [[Get]] assumes that 
> > its argument P is bound to a property name (a String)). At one point we 
> > suggested removing this restriction, so that "proxy[obj]" would give the 
> > get trap direct access to obj (which would be particularly useful when 
> > intercepting numeric indices on array-like proxies). IIRC, we didn't pursue 
> > this option since engines rely on property names being strings in other 
> > places, and widening the type of property names to cover arbitrary objects 
> > would be problematic.
> 
> SpiderMonkey has a wider internal property name type, which can accomodate at 
> least int and object names. The int case is an optimization, commonly done. 
> The object case is for E4X and perhaps private names.
> 
> Oliver wrote in the thread at the time that he thought allowing any value to 
> be used as a property name (in brackets) and passed through uncoerced to 
> proxies was implementable without trouble for JavaScriptCore, IIRC.
> 
> That's the opposite of my memory, but it was a long time ago. 

I was thinking of

http://www.mail-archive.com/[email protected]/msg05392.html

at least. Probably some IRC convo after that as well, but at least that.

/be

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

Reply via email to