Re: [ES Harmony Proxies] Fundamental trap definition

2011-01-30 Thread Tom Van Cutsem
2011/1/27 David Bruant bru...@enseirb-matmeca.fr Le 27/01/2011 11:20, Tom Van Cutsem a écrit : - Agreed that if we contemplate adding 'proxy' as an argument to getPropertyDescriptor and getPropertyNames, we should add it to all other traps as well. - Agreed that this is the simplest way of

Re: [ES Harmony Proxies] Fundamental trap definition

2011-01-30 Thread Allen Wirfs-Brock
On Jan 30, 2011, at 8:32 AM, Tom Van Cutsem wrote: ... Right, this issue has come up before. From the open issues on the proxies wiki page: TC39 Meeting 1/28/10 The number of operators that proxies can virtualize is still open for discussion. The current proposal does not allow proxies

Re: [ES Harmony Proxies] Fundamental trap definition

2011-01-27 Thread David Bruant
Le 27/01/2011 11:20, Tom Van Cutsem a écrit : - Agreed that if we contemplate adding 'proxy' as an argument to getPropertyDescriptor and getPropertyNames, we should add it to all other traps as well. - Agreed that this is the simplest way of allowing a shared handler to get at the proxy it's

Re: [ES Harmony Proxies] Fundamental trap definition

2011-01-27 Thread Brendan Eich
I will let Tom and Mark field this one in full, but Arrays are *not* host objects, they are native objects in ECMA-262 terms. However, Allen has taken the action to reconcile and perhaps unify the spec's internal methods (its Meta-Object Protocol) and Proxies' MOP. This would allow the spec to

Re: [ES Harmony Proxies] Fundamental trap definition

2011-01-26 Thread David Bruant
. Miller mailto:erig...@google.com *Subject:* [ES Harmony Proxies] Fundamental trap definition Hi, I am wondering if getPropertyDescriptor and getPropertyNames fundamental traps shouldn't rather be derived traps since they could have a pretty

Re: [ES Harmony Proxies] Fundamental trap definition

2011-01-26 Thread Allen Wirfs-Brock
: Mark S. Miller Subject: [ES Harmony Proxies] Fundamental trap definition Hi, I am wondering if getPropertyDescriptor and getPropertyNames fundamental traps shouldn't rather be derived traps since they could have a pretty straightforward default implementation. One implementation

Re: [ES Harmony Proxies] Fundamental trap definition

2011-01-26 Thread Brendan Eich
On Jan 26, 2011, at 9:54 AM, David Bruant wrote: Le 26/01/2011 17:45, Tom Van Cutsem a écrit : Ok, so Mark and I briefly discussed the implications of making getPropertyDescriptor and getPropertyNames derived. Here's one issue: if you try and write these traps as methods of some sort

Re: [ES Harmony Proxies] Fundamental trap definition

2011-01-26 Thread David Bruant
Le 26/01/2011 19:17, Brendan Eich a écrit : On Jan 26, 2011, at 9:54 AM, David Bruant wrote: Le 26/01/2011 17:45, Tom Van Cutsem a écrit : Ok, so Mark and I briefly discussed the implications of making getPropertyDescriptor and getPropertyNames derived. Here's one issue: if you try and

Re: [ES Harmony Proxies] Fundamental trap definition

2011-01-26 Thread Brendan Eich
On Jan 26, 2011, at 11:02 AM, David Bruant wrote: On the question of proxy parameters for all traps (well, receiver for get and set): fewer args are better, and closure capture of proxy by handler avoids leaking the proxy to handler friends, if that matters. Likewise you can't get the

Re: [ES Harmony Proxies] Fundamental trap definition

2011-01-26 Thread Brendan Eich
We avoid freeze-didacticism in general ;-) -- is there a strong reason to freeze in this example? /be On Jan 26, 2011, at 2:51 PM, David Bruant wrote: Le 26/01/2011 22:31, Brendan Eich a écrit : On Jan 26, 2011, at 11:02 AM, David Bruant wrote: On the question of proxy parameters for all

Re: [ES Harmony Proxies] Fundamental trap definition (refinement) and derived traps definitions

2011-01-25 Thread Tom Van Cutsem
If a proxy implementor doesn't faithfully implement the semantics of a trap (i.e. a getPropertyNames() trap that doesn't appear to take the prototype chain into account, one way or another), then all bets re. consistency are off anyway, regardless of the default semantics we choose for

Re: [ES Harmony Proxies] Fundamental trap definition

2011-01-24 Thread Tom Van Cutsem
feature, but one that still needs some work before implementation ;-) Regards, François *From:* David Bruant bru...@enseirb-matmeca.fr *Sent:* Sunday, January 23, 2011 4:24 PM *To:* es-discuss es-discuss@mozilla.org *Cc:* Mark S. Miller erig...@google.com *Subject:* [ES Harmony Proxies

[ES Harmony Proxies] Fundamental trap definition

2011-01-23 Thread David Bruant
Hi, I am wondering if getPropertyDescriptor and getPropertyNames fundamental traps shouldn't rather be derived traps since they could have a pretty straightforward default implementation. One implementation of getPropertyNames could be : -- Object.getPropertyNames =

Re: [ES Harmony Proxies] Fundamental trap definition

2011-01-23 Thread François REMY
Subject: [ES Harmony Proxies] Fundamental trap definition Hi, I am wondering if getPropertyDescriptor and getPropertyNames fundamental traps shouldn't rather be derived traps since they could have a pretty straightforward default implementation. One implementation of getPropertyNames could

Re: [ES Harmony Proxies] Fundamental trap definition

2011-01-23 Thread Brendan Eich
, but one that still needs some work before implementation ;-) Regards, François From: David Bruant Sent: Sunday, January 23, 2011 4:24 PM To: es-discuss Cc: Mark S. Miller Subject: [ES Harmony Proxies] Fundamental trap definition Hi, I am wondering if getPropertyDescriptor