Re: Reflection of global bindings

2012-12-17 Thread Andreas Rossberg
On 15 December 2012 22:52, Allen Wirfs-Brock al...@wirfs-brock.com wrote: So, to me, it sounds like that to continue down this path we should really add new non-reflected properties attributes that are the real control points for the ES semantics. Eg, we may need [[RealReadOnly]],

Re: Reflection of global bindings

2012-12-17 Thread Mark S. Miller
On Mon, Dec 17, 2012 at 2:03 AM, Andreas Rossberg rossb...@google.com wrote: On 15 December 2012 22:52, Allen Wirfs-Brock al...@wirfs-brock.com wrote: So, to me, it sounds like that to continue down this path we should really add new non-reflected properties attributes that are the real

Re: Reflection of global bindings

2012-12-17 Thread Andreas Rossberg
On 17 December 2012 13:01, Mark S. Miller erig...@google.com wrote: On Mon, Dec 17, 2012 at 2:03 AM, Andreas Rossberg rossb...@google.com wrote: I see the following preferable solutions to deal with DOM features violating ES: 1. Lobby to fix the DOM and make it conform to ES instead of the

Re: Reflection of global bindings

2012-12-17 Thread Mark S. Miller
On Mon, Dec 17, 2012 at 4:26 AM, Andreas Rossberg rossb...@google.com wrote: On 17 December 2012 13:01, Mark S. Miller erig...@google.com wrote: On Mon, Dec 17, 2012 at 2:03 AM, Andreas Rossberg rossb...@google.com wrote: I see the following preferable solutions to deal with DOM features

Re: Reflection of global bindings

2012-12-17 Thread Rick Waldron
On Mon, Dec 17, 2012 at 5:03 AM, Andreas Rossberg rossb...@google.comwrote: Now I'm really scared. Please let's not go there. I see the following preferable solutions to deal with DOM features violating ES: 1. Lobby to fix the DOM and make it conform to ES instead of the other way round.

Re: Reflection of global bindings

2012-12-17 Thread David Bruant
Le 17/12/2012 13:51, Mark S. Miller a écrit : On Mon, Dec 17, 2012 at 4:26 AM, Andreas Rossberg rossb...@google.com wrote: On 17 December 2012 13:01, Mark S. Miller erig...@google.com wrote: On Mon, Dec 17, 2012 at 2:03 AM, Andreas Rossberg rossb...@google.com wrote: I see the following

Re: Reflection of global bindings

2012-12-17 Thread Boris Zbarsky
On 12/17/12 4:51 AM, Mark S. Miller wrote: Independent of these specific issues, I think that the whole Window vs WindowProxy hack is terrible. If anyone thinks there is any hope of getting rid of this hack, I encourage you to try. For what it's worth, it's specified that way not least because

Re: Reflection of global bindings

2012-12-16 Thread David Bruant
Hi Allen, I don't think we're circling. I think we're doing a spiral (which may give the impression that we're circling while we're moving forward). More answers inline. Le 15/12/2012 22:52, Allen Wirfs-Brock a écrit : (...) In ES5, we added reflection operations that allow ES code to

Reflection of global bindings

2012-12-15 Thread David Bruant
Hi, On public-script-coord, Boris Zbarsky showed an example [1] where a global variable is var-defined and then observed to be absent from the global object it was attached to (because the WindowProxy has changed of underlying window object). The careful ECMAScript 5.1 reader knows that

Re: Reflection of global bindings

2012-12-15 Thread Boris Zbarsky
On 12/15/12 12:21 PM, David Bruant wrote: On public-script-coord, Boris Zbarsky showed an example [1] where a global variable is var-defined and then observed to be absent from the global object it was attached to (because the WindowProxy has changed of underlying window object). No, nothing

Re: Reflection of global bindings

2012-12-15 Thread Brandon Benvie
The need to do what was proposed is the same though. Configurability can be arm twisted into submission for things like document and location via accessors, and the WindowProxy can refuse to accept non-configurable properties defined using Object.defineProperty, but that leaves non-configurable

Re: Reflection of global bindings

2012-12-15 Thread David Bruant
Le 15/12/2012 18:23, Boris Zbarsky a écrit : On 12/15/12 12:21 PM, David Bruant wrote: On public-script-coord, Boris Zbarsky showed an example [1] where a global variable is var-defined and then observed to be absent from the global object it was attached to (because the WindowProxy has changed

Re: Reflection of global bindings

2012-12-15 Thread Boris Zbarsky
On 12/15/12 12:34 PM, David Bruant wrote: No, nothing of the sort. The example shows it _present_ on the global (the third alert in my example) but missing from the WindowProxy (fourth alert). I'm comparing the second and fourth alert (that's not what the example was created to show, but

Re: Reflection of global bindings

2012-12-15 Thread David Bruant
Le 15/12/2012 18:37, Boris Zbarsky a écrit : On 12/15/12 12:34 PM, David Bruant wrote: No, nothing of the sort. The example shows it _present_ on the global (the third alert in my example) but missing from the WindowProxy (fourth alert). I'm comparing the second and fourth alert (that's not

Re: Reflection of global bindings

2012-12-15 Thread Boris Zbarsky
On 12/15/12 12:48 PM, David Bruant wrote: Sure, but those aren't properties on the _global_. They're properties on a different object. Script authors can't observe the fact that it's a different object. Yes, they can. The third and fourth alerts in my testcase constitute just such an

Re: Reflection of global bindings

2012-12-15 Thread Allen Wirfs-Brock
On Dec 15, 2012, at 9:21 AM, David Bruant wrote: Hi, On public-script-coord, Boris Zbarsky showed an example [1] where a global variable is var-defined and then observed to be absent from the global object it was attached to (because the WindowProxy has changed of underlying window

Re: Reflection of global bindings

2012-12-15 Thread Brendan Eich
Allen Wirfs-Brock wrote: On Dec 15, 2012, at 9:21 AM, David Bruant wrote: Hi, On public-script-coord, Boris Zbarsky showed an example [1] where a global variable is var-defined and then observed to be absent from the global object it was attached to (because the WindowProxy has changed of

RE: Reflection of global bindings

2012-12-15 Thread Domenic Denicola
From: es-discuss-boun...@mozilla.org [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Brendan Eich Sent: Saturday, December 15, 2012 14:26 Reflecting var and function bindings on window (or |this| or |self| or other aliases) as configurable properties, but refusing to allow

Re: Reflection of global bindings

2012-12-15 Thread Brendan Eich
Domenic Denicola wrote: From: es-discuss-boun...@mozilla.org [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Brendan Eich Sent: Saturday, December 15, 2012 14:26 Reflecting var and function bindings on window (or |this| or |self| or other aliases) as configurable properties, but

Re: Reflection of global bindings

2012-12-15 Thread David Bruant
Le 15/12/2012 19:38, Allen Wirfs-Brock a écrit : On Dec 15, 2012, at 9:21 AM, David Bruant wrote: Hi, On public-script-coord, Boris Zbarsky showed an example [1] where a global variable is var-defined and then observed to be absent from the global object it was attached to (because the

Re: Reflection of global bindings

2012-12-15 Thread Allen Wirfs-Brock
On Dec 15, 2012, at 12:12 PM, Brendan Eich wrote: Domenic Denicola wrote: From: es-discuss-boun...@mozilla.org [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Brendan Eich Sent: Saturday, December 15, 2012 14:26 Reflecting var and function bindings on window (or |this| or |self|