On Sep 24, 2013, at 11:50 AM, Brendan Eich wrote:

>> Brandon Benvie <mailto:[email protected]>
>> September 24, 2013 11:44 AM
>> 
>> 
>> It seems unfortunate that we have to rely on a membrane for something as 
>> simply as `new Proxy(new Date, {}).getDate()` to work. [[Invoke]] as 
>> currently specced gets us somewhere at least.
> 
> Somewhere half-right and half-wrong, depending on target object details over 
> which a single trap cannot hope to abstract, is still half-wrong. Membranes 
> based on built-in libraries should be easy enough to use.

I think this is a key point.  Things like 'new Proxy(new Date, {}).getDate()' 
just don't work as expected with direct proxies and we have not been able to 
fix that while maintaining other important semantic requirements.   If JS 
programmer have an expectation that they can usefully write such code they are 
going to be disappointed.  Direct proxies seem to be a fine primitive for 
implementing membranes and some virtual objects.  They aren't good for things 
like this Date example.

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

Reply via email to