IIRC I was saying that the engine should simply allow non-objects types to pass 
through uncoerced, rather than taking any particular stance on ease of 
implementation.  I suspect in JSC that we would be able to do it without too 
much difficulty, but there's a a world of difference between that, and it 
actually being the case.

--Oliver

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. Oliver?
> 
>  
> 
> /be
> 
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
> 
> 
> 
> -- 
>     Cheers,
>     --MarkM

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

Reply via email to