Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-12-10 Thread Tom Van Cutsem
To pick up this thread again, I gave a talk about the trade-offs in designing JS proxies at a meeting last week. The people following this thread may be interested in seeing the slides: http://soft.vub.ac.be/~tvcutsem/invokedynamic/presentations/Tradeoffs_WGLD2012_Austin.pdf (the talk

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-12-03 Thread David Bruant
Le 03/12/2012 00:06, David Bruant a écrit : The call to action performs the original operation on target and remembers the result. After the trap returns, the proxy returns the remembered result of action. target = {a:1}; var p = new Proxy(target, { get: function(target, name,

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-12-03 Thread Mark S. Miller
What eternal[1] invariant does this bypass? [1] https://mail.mozilla.org/pipermail/es-discuss/2011-May/014150.html On Mon, Dec 3, 2012 at 3:33 AM, David Bruant bruan...@gmail.com wrote: Le 03/12/2012 00:06, David Bruant a écrit : The call to action performs the original operation on target

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-12-03 Thread David Bruant
Le 03/12/2012 16:38, Mark S. Miller a écrit : What eternal[1] invariant does this bypass? [1] https://mail.mozilla.org/pipermail/es-discuss/2011-May/014150.html Apparently none... Yet, additionally to the last case I showed, there is also: var p = new Proxy({a:1}, { isExtensible:

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-12-02 Thread Tom Van Cutsem
2012/11/28 Brandon Benvie bran...@brandonbenvie.com Object.observe would fit under after correct? Yes, with two remarks: - it only traps updating operations - the traps are called in a separate turn (i.e. asynchronously), so they cannot change the result of the operation Cheers, Tom

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-12-02 Thread Tom Van Cutsem
2012/11/28 David Bruant bruan...@gmail.com I don't understand why a unique token per trap invocation would be necessary. I still don't understand this point. I've gone spelunking. I've found: * the wiki page [1] (reflecting July meeting) which mentions that returning undefined would

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-12-02 Thread Tom Van Cutsem
2012/11/29 Dean Tribble dtrib...@gmail.com As a general point, I encourage you to look for other inspiration than CLOS MOP for doign proxies (whose mother was really InterlispD). Meta-level access deeply impacts security,maintainability, reliability, understandability, etc. The tighter and

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-12-02 Thread David Bruant
Le 02/12/2012 17:27, Tom Van Cutsem a écrit : 2012/11/28 David Bruant bruan...@gmail.com mailto:bruan...@gmail.com I don't understand why a unique token per trap invocation would be necessary. I still don't understand this point. I've gone spelunking. I've found: * the

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-12-02 Thread David Bruant
Le 02/12/2012 17:43, David Bruant a écrit : Maybe I'm too influenced by the JVM, but my understanding is that wrapping every call to a trap with a try-catch block won't be free. The more interesting question is whether it would be significantly cheaper than 'returning a value+invariant checks'

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-12-02 Thread Mark S. Miller
On Sun, Dec 2, 2012 at 8:40 AM, Tom Van Cutsem tomvc...@gmail.com wrote: - after-style wrapping allows you to get notified of an operation after-the-fact. Depending on the API, the after-wrapper may or may not get to see the outcome of the operation, and may or may not change the final outcome

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-12-02 Thread Tom Van Cutsem
2012/12/2 Mark S. Miller erig...@google.com I think we can rescue around wrapping. I'll call this approach opaque around wrapping. The idea is that the proxy passes into the handler trap a proxy-generated no-argument function (a thunk) called action. Interesting. I had thought of a similar

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-12-02 Thread Allen Wirfs-Brock
On Dec 2, 2012, at 11:40 AM, Tom Van Cutsem wrote: 2012/12/2 Mark S. Miller erig...@google.com I think we can rescue around wrapping. I'll call this approach opaque around wrapping. The idea is that the proxy passes into the handler trap a proxy-generated no-argument function (a thunk)

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-12-02 Thread David Bruant
Le 02/12/2012 18:34, Mark S. Miller a écrit : On Sun, Dec 2, 2012 at 8:40 AM, Tom Van Cutsem tomvc...@gmail.com wrote: - after-style wrapping allows you to get notified of an operation after-the-fact. Depending on the API, the after-wrapper may or may not get to see the outcome of the

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-12-02 Thread David Bruant
Le 02/12/2012 20:40, Tom Van Cutsem a écrit : 2012/12/2 Mark S. Miller erig...@google.com mailto:erig...@google.com I think we can rescue around wrapping. I'll call this approach opaque around wrapping. The idea is that the proxy passes into the handler trap a proxy-generated

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-11-28 Thread Tom Van Cutsem
2012/11/26 Dean Tribble dtrib...@gmail.com On Mon, Nov 26, 2012 at 11:33 AM, Tom Van Cutsem tomvc...@gmail.comwrote: Thanks for spelling out these examples. While they still don't feel like actual important use cases to support, they give a good flavor of the kinds of compromises we'd need

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-11-28 Thread Brandon Benvie
Object.observe would fit under after correct? On Wed, Nov 28, 2012 at 4:09 PM, Tom Van Cutsem tomvc...@gmail.com wrote: 2012/11/26 Dean Tribble dtrib...@gmail.com On Mon, Nov 26, 2012 at 11:33 AM, Tom Van Cutsem tomvc...@gmail.comwrote: Thanks for spelling out these examples. While they

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-11-28 Thread David Bruant
Le 26/11/2012 21:39, David Bruant a écrit : Le 26/11/2012 20:59, Tom Van Cutsem a écrit : 2012/11/26 David Bruant bruan...@gmail.com mailto:bruan...@gmail.com We could define a symbolic value (like StopIteration for iterators) that would mean forward to target. By essence of what

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-11-28 Thread Dean Tribble
On Wed, Nov 28, 2012 at 1:09 PM, Tom Van Cutsem tomvc...@gmail.com wrote: 2012/11/26 Dean Tribble dtrib...@gmail.com ... I agree. My usual expectation for proxies is to support remote and persistent objects. While supporting other scenarios is great, usually that's incidental. Is there a

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-11-28 Thread Allen Wirfs-Brock
On Nov 28, 2012, at 1:09 PM, Tom Van Cutsem wrote: 2012/11/26 Dean Tribble dtrib...@gmail.com On Mon, Nov 26, 2012 at 11:33 AM, Tom Van Cutsem tomvc...@gmail.com wrote: Thanks for spelling out these examples. While they still don't feel like actual important use cases to support, they give

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-11-26 Thread David Bruant
Le 25/11/2012 15:32, Axel Rauschmayer a écrit : If indeed both kinds of proxy are useful and direct proxies are more powerful, then why not only have a foundational direct proxy API and implement a tool type NotificationProxy that is based on that API. An interesting question I still haven't

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-11-26 Thread David Bruant
Le 25/11/2012 12:44, Tom Van Cutsem a écrit : (...) I agree that the big benefit of notification proxies is that they get rid of all the complex validation logic. However, some reservations: (...) - I think we do lose some expressiveness in the case of pure virtual object abstractions that

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-11-26 Thread Sam Tobin-Hochstadt
On Mon, Nov 26, 2012 at 3:36 AM, David Bruant bruan...@gmail.com wrote: Le 25/11/2012 15:32, Axel Rauschmayer a écrit : If indeed both kinds of proxy are useful and direct proxies are more powerful, then why not only have a foundational direct proxy API and implement a tool type

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-11-26 Thread Allen Wirfs-Brock
On Nov 26, 2012, at 12:36 AM, David Bruant wrote: Le 25/11/2012 15:32, Axel Rauschmayer a écrit : If indeed both kinds of proxy are useful and direct proxies are more powerful, then why not only have a foundational direct proxy API and implement a tool type NotificationProxy that is based

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-11-26 Thread David Bruant
Le 26/11/2012 19:58, Allen Wirfs-Brock a écrit : On Nov 26, 2012, at 12:36 AM, David Bruant wrote: Le 25/11/2012 15:32, Axel Rauschmayer a écrit : If indeed both kinds of proxy are useful and direct proxies are more powerful, then why not only have a foundational direct proxy API and

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-11-26 Thread Tom Van Cutsem
2012/11/25 Allen Wirfs-Brock al...@wirfs-brock.com I have a couple virtual object use cases in mind where I don't think I would want to make all properties concrete on the target. Thanks for spelling out these examples. While they still don't feel like actual important use cases to support,

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-11-26 Thread Brandon Benvie
There's a few goals I have in mind when thinking about proxies: * Ability to forward to target at minimal cost. * Minimal cost for invariant enforcement, preferably automatic since the result is predetermined * Near zero cost for invariant enforcement in the majority of cases where it's not needed

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-11-26 Thread Dean Tribble
I started to respond to Allan's message, but I'll combine them to here. Note the additional proposal in the middle of the message. On Mon, Nov 26, 2012 at 11:33 AM, Tom Van Cutsem tomvc...@gmail.com wrote: 2012/11/25 Allen Wirfs-Brock al...@wirfs-brock.com I have a couple virtual object use

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-11-26 Thread David Bruant
Le 26/11/2012 20:59, Tom Van Cutsem a écrit : 2012/11/26 David Bruant bruan...@gmail.com mailto:bruan...@gmail.com We could define a symbolic value (like StopIteration for iterators) that would mean forward to target. By essence of what forwarding to the target means, there would be

Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-11-25 Thread Tom Van Cutsem
Hi, I will refer to Dean's proposal as notification proxies (where traps essentially become notification callbacks), and will continue to use direct proxies for the current design where the trap can return a result (which is then verified). These notification proxies remind me a lot of how one

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-11-25 Thread Brandon Benvie
I think it could be argued that the two categories of proxy uses have different enough fundamentals that they would be better suited broken into two separate types of proxies. They use a common protocol for dispatching notifications/requests, but the result is incompatible. For a Notification

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-11-25 Thread Axel Rauschmayer
If indeed both kinds of proxy are useful and direct proxies are more powerful, then why not only have a foundational direct proxy API and implement a tool type NotificationProxy that is based on that API. [[[Sent from a mobile device. Please forgive brevity and typos.]]] Dr. Axel Rauschmayer

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-11-25 Thread Allen Wirfs-Brock
On Nov 25, 2012, at 4:15 AM, Brandon Benvie wrote: I think it could be argued that the two categories of proxy uses have different enough fundamentals that they would be better suited broken into two separate types of proxies. They use a common protocol for dispatching

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-11-25 Thread Allen Wirfs-Brock
On Nov 25, 2012, at 3:44 AM, Tom Van Cutsem wrote: Hi, I will refer to Dean's proposal as notification proxies (where traps essentially become notification callbacks), and will continue to use direct proxies for the current design where the trap can return a result (which is then

Re: Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)

2012-11-25 Thread Allen Wirfs-Brock
On Nov 25, 2012, at 6:32 AM, Axel Rauschmayer wrote: If indeed both kinds of proxy are useful and direct proxies are more powerful, then why not only have a foundational direct proxy API and implement a tool type NotificationProxy that is based on that API. That might work. In that case

Re: possible excessive proxy invariants for Object.keys/etc??

2012-11-24 Thread Dean Tribble
...@mozilla.com Subject: possible excessive proxy invariants for Object.keys/etc?? I'm wondering if the wiki spec. for these functions aren't doing invariant checking that goes beyond what is required for the integrity purposes you have stated. In general, proxies traps check to ensure

Re: possible excessive proxy invariants for Object.keys/etc??

2012-11-24 Thread Mark S. Miller
Orendorff jorendo...@mozilla.com Subject: possible excessive proxy invariants for Object.keys/etc?? I'm wondering if the wiki spec. for these functions aren't doing invariant checking that goes beyond what is required for the integrity purposes you have stated. In general, proxies traps

Re: possible excessive proxy invariants for Object.keys/etc??

2012-11-22 Thread Tom Van Cutsem
2012/11/21 Allen Wirfs-Brock al...@wirfs-brock.com On Nov 21, 2012, at 12:09 PM, Tom Van Cutsem wrote: Let's first discuss whether there is an issue with just letting (unique) symbols show up in Object.{keys,getOwnPropertyNames}. It's still a change in return type (from Array[String] to

Re: possible excessive proxy invariants for Object.keys/etc??

2012-11-22 Thread Allen Wirfs-Brock
On Nov 22, 2012, at 5:36 AM, Tom Van Cutsem wrote: 2012/11/21 Allen Wirfs-Brock al...@wirfs-brock.com On Nov 21, 2012, at 12:09 PM, Tom Van Cutsem wrote: Let's first discuss whether there is an issue with just letting (unique) symbols show up in Object.{keys,getOwnPropertyNames}. It's

Re: possible excessive proxy invariants for Object.keys/etc??

2012-11-21 Thread David Bruant
Le 21/11/2012 01:06, Allen Wirfs-Brock a écrit : b) that all the elements of the result are Strings And presumably Symbols. We have to also accommodate Symbols, at least for getOwnPropetyNames. Regardless, why is this important? More below... Same argument as above. I

Re: possible excessive proxy invariants for Object.keys/etc??

2012-11-21 Thread Andreas Rossberg
On 21 November 2012 01:06, Allen Wirfs-Brock al...@wirfs-brock.com wrote: Tom Van Cutsem tomvc...@gmail.com wrote: Allen Wirfs-Brock al...@wirfs-brock.com wrote: Tom Van Cutsem tomvc...@gmail.com wrote: c) to ensure the stability of the result. You can think of a + b as implementing a type

Re: possible excessive proxy invariants for Object.keys/etc??

2012-11-21 Thread Allen Wirfs-Brock
On Nov 21, 2012, at 1:55 AM, David Bruant wrote: Le 21/11/2012 01:06, Allen Wirfs-Brock a écrit : b) that all the elements of the result are Strings And presumably Symbols. We have to also accommodate Symbols, at least for getOwnPropetyNames. Regardless, why is this important? More

Re: possible excessive proxy invariants for Object.keys/etc??

2012-11-21 Thread Allen Wirfs-Brock
On Nov 21, 2012, at 3:54 AM, Andreas Rossberg wrote: On 21 November 2012 01:06, Allen Wirfs-Brock al...@wirfs-brock.com wrote: Tom Van Cutsem tomvc...@gmail.com wrote: Allen Wirfs-Brock al...@wirfs-brock.com wrote: Tom Van Cutsem tomvc...@gmail.com wrote: c) to ensure the stability of the

Re: possible excessive proxy invariants for Object.keys/etc??

2012-11-21 Thread Andreas Rossberg
On 21 November 2012 17:55, Allen Wirfs-Brock al...@wirfs-brock.com wrote: I'd be more favorably inclined towards freezing than I am towards copying. But, as you know, ES5 does not currently produce frozen objects in these situations. I feel uncomfortable about enforcing a frozen invariant

Re: possible excessive proxy invariants for Object.keys/etc??

2012-11-21 Thread Andreas Rossberg
On 21 November 2012 18:35, Allen Wirfs-Brock al...@wirfs-brock.com wrote: If you are writing any sort of generic algorithm that does a freeze check on an arbitrary object you have to explicitly perform all of the internal method calls because you don't know whether the object is a proxy

Re: possible excessive proxy invariants for Object.keys/etc??

2012-11-21 Thread David Bruant
Le 21/11/2012 17:37, Allen Wirfs-Brock a écrit : On Nov 21, 2012, at 1:55 AM, David Bruant wrote: Le 21/11/2012 01:06, Allen Wirfs-Brock a écrit : b) that all the elements of the result are Strings And presumably Symbols. We have to also accommodate Symbols, at least for

Re: possible excessive proxy invariants for Object.keys/etc??

2012-11-21 Thread Tom Van Cutsem
2012/11/19 Allen Wirfs-Brock al...@wirfs-brock.com On Nov 19, 2012, at 10:04 AM, Tom Van Cutsem wrote: It's all a matter of developer expectations and how much leeway we have in changing the return type of existing built-ins. In theory, it's a backwards-incompatible change. In practice,

Re: possible excessive proxy invariants for Object.keys/etc??

2012-11-21 Thread Tom Van Cutsem
2012/11/21 David Bruant bruan...@gmail.com Since the use of Object.getOwnPropertyNames may not be widespread, maybe that making non-enumerable unique symbol properties could do the trick (as it has with new {Object, Array, etc.}.prototype additions) 1bis) If all standard built-in names are

Re: possible excessive proxy invariants for Object.keys/etc??

2012-11-21 Thread Tom Van Cutsem
2012/11/21 Allen Wirfs-Brock al...@wirfs-brock.com I'd be more favorably inclined towards freezing than I am towards copying. But, as you know, ES5 does not currently produce frozen objects in these situations. I feel uncomfortable about enforcing a frozen invariant for traps where that

Re: possible excessive proxy invariants for Object.keys/etc??

2012-11-21 Thread Tom Van Cutsem
2012/11/21 Mark S. Miller erig...@google.com On Wed, Nov 21, 2012 at 8:55 AM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: [...] Essentially we could internally turn the [[Extensible]] internal property into a four state value: open,non-extensible,sealed,frozen. [...] First, my

Re: possible excessive proxy invariants for Object.keys/etc??

2012-11-21 Thread Allen Wirfs-Brock
On Nov 21, 2012, at 11:13 AM, David Bruant wrote: Le 21/11/2012 17:37, Allen Wirfs-Brock a écrit : On Nov 21, 2012, at 1:55 AM, David Bruant wrote: Le 21/11/2012 01:06, Allen Wirfs-Brock a écrit : b) that all the elements of the result are Strings And presumably Symbols. We have to

Re: possible excessive proxy invariants for Object.keys/etc??

2012-11-21 Thread Kevin Reid
On Wed, Nov 21, 2012 at 12:42 PM, Tom Van Cutsem tomvc...@gmail.com wrote: 2012/11/21 Mark S. Miller erig...@google.com On Wed, Nov 21, 2012 at 8:55 AM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: [...] Essentially we could internally turn the [[Extensible]] internal property into a

Re: possible excessive proxy invariants for Object.keys/etc??

2012-11-21 Thread David Bruant
Le 21/11/2012 21:13, Tom Van Cutsem a écrit : 2012/11/21 David Bruant bruan...@gmail.com mailto:bruan...@gmail.com Since the use of Object.getOwnPropertyNames may not be widespread, maybe that making non-enumerable unique symbol properties could do the trick (as it has with new

Re: possible excessive proxy invariants for Object.keys/etc??

2012-11-21 Thread Allen Wirfs-Brock
On Nov 21, 2012, at 12:09 PM, Tom Van Cutsem wrote: 2012/11/19 Allen Wirfs-Brock al...@wirfs-brock.com On Nov 19, 2012, at 10:04 AM, Tom Van Cutsem wrote: It's all a matter of developer expectations and how much leeway we have in changing the return type of existing built-ins. In theory,

Re: possible excessive proxy invariants for Object.keys/etc??

2012-11-21 Thread Allen Wirfs-Brock
On Nov 21, 2012, at 12:27 PM, Tom Van Cutsem wrote: 2012/11/21 Allen Wirfs-Brock al...@wirfs-brock.com I'd be more favorably inclined towards freezing than I am towards copying. But, as you know, ES5 does not currently produce frozen objects in these situations. I feel uncomfortable

Re: possible excessive proxy invariants for Object.keys/etc??

2012-11-21 Thread Allen Wirfs-Brock
On Nov 21, 2012, at 12:42 PM, Tom Van Cutsem wrote: 2012/11/21 Mark S. Miller erig...@google.com On Wed, Nov 21, 2012 at 8:55 AM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: [...] Essentially we could internally turn the [[Extensible]] internal property into a four state value:

Fwd: possible excessive proxy invariants for Object.keys/etc??

2012-11-20 Thread Allen Wirfs-Brock
with other to follow: Begin forwarded message: From: Allen Wirfs-Brock al...@wirfs-brock.com Date: November 18, 2012 1:26:14 PM PST To: Tom Van Cutsem tomvc...@gmail.com, Mark S. Miller erig...@google.com Cc: Jason Orendorff jorendo...@mozilla.com Subject: possible excessive proxy invariants

Re: possible excessive proxy invariants for Object.keys/etc??

2012-11-20 Thread Tom Van Cutsem
Hi Allen, 2012/11/18 Allen Wirfs-Brock al...@wirfs-brock.com The proxy spec.for Object.getOwnPropertyNames/kets/etc. seem to be doing quite a bit more than this. They 1) always copy the array returned from the trap? Why is this necessary? Sure the author of a trap should probably always

Re: possible excessive proxy invariants for Object.keys/etc??

2012-11-20 Thread Allen Wirfs-Brock
On Nov 19, 2012, at 10:04 AM, Tom Van Cutsem wrote: Hi Allen, 2012/11/18 Allen Wirfs-Brock al...@wirfs-brock.com The proxy spec.for Object.getOwnPropertyNames/kets/etc. seem to be doing quite a bit more than this. They 1) always copy the array returned from the trap? Why is this

Re: possible excessive proxy invariants for Object.keys/etc??

2012-11-20 Thread Tom Van Cutsem
2012/11/19 Allen Wirfs-Brock al...@wirfs-brock.com On Nov 19, 2012, at 10:04 AM, Tom Van Cutsem wrote: The copying is to ensure: a) that the result is an Array Why is Array-ness essential? It was what ES5 specified, but ES5 had a fixed implementations of Object.getOwnPropertyNames/keys so

Fwd: possible excessive proxy invariants for Object.keys/etc??

2012-11-20 Thread Allen Wirfs-Brock
19, 2012 10:04:56 AM PST To: Allen Wirfs-Brock al...@wirfs-brock.com Cc: Mark S. Miller erig...@google.com, Jason Orendorff jorendo...@mozilla.com Subject: Re: possible excessive proxy invariants for Object.keys/etc?? Hi Allen, 2012/11/18 Allen Wirfs-Brock al...@wirfs-brock.com

Fwd: possible excessive proxy invariants for Object.keys/etc??

2012-11-20 Thread Allen Wirfs-Brock
Begin forwarded message: From: Allen Wirfs-Brock al...@wirfs-brock.com Date: November 19, 2012 2:11:52 PM PST To: Tom Van Cutsem tomvc...@gmail.com Cc: Mark S. Miller erig...@google.com, Jason Orendorff jorendo...@mozilla.com Subject: Re: possible excessive proxy invariants

Fwd: possible excessive proxy invariants for Object.keys/etc??

2012-11-20 Thread Allen Wirfs-Brock
Begin forwarded message: From: Tom Van Cutsem tomvc...@gmail.com Date: November 20, 2012 11:36:24 AM PST To: Allen Wirfs-Brock al...@wirfs-brock.com Cc: Mark S. Miller erig...@google.com, Jason Orendorff jorendo...@mozilla.com Subject: Re: possible excessive proxy invariants

Re: possible excessive proxy invariants for Object.keys/etc??

2012-11-20 Thread Brandon Benvie
In regards to the non-configurable/extensible issue, the issue is that the proxy still needs to be *notified* of what's happening, but it's not really allowed to *trap* because the result is predetermined. Currently this is handled by treating it like a normal trap activation with extra

Re: possible excessive proxy invariants for Object.keys/etc??

2012-11-20 Thread Allen Wirfs-Brock
, Jason Orendorff jorendo...@mozilla.com Subject: Re: possible excessive proxy invariants for Object.keys/etc?? 2012/11/19 Allen Wirfs-Brock al...@wirfs-brock.com On Nov 19, 2012, at 10:04 AM, Tom Van Cutsem wrote: The copying is to ensure: a) that the result is an Array Why is Array-ness

Re: possible excessive proxy invariants for Object.keys/etc??

2012-11-20 Thread Allen Wirfs-Brock
On Nov 20, 2012, at 3:16 PM, Brandon Benvie wrote: In regards to the non-configurable/extensible issue, the issue is that the proxy still needs to be *notified* of what's happening, but it's not really allowed to *trap* because the result is predetermined. Currently this is handled by