Re: URLs / subclassing JavaScript

2012-12-18 Thread Allen Wirfs-Brock
On Dec 18, 2012, at 1:36 PM, Anne van Kesteren wrote: > On Tue, Dec 18, 2012 at 6:01 PM, Allen Wirfs-Brock > wrote: >>> It seems you either need to use a Proxy, some kind of wrapper method, >>> or a custom implementation in most cases. Typically when objects akin >>> to Map or Array are exposed

Re: URLs / subclassing JavaScript

2012-12-18 Thread Anne van Kesteren
On Tue, Dec 18, 2012 at 6:01 PM, Allen Wirfs-Brock wrote: >> It seems you either need to use a Proxy, some kind of wrapper method, >> or a custom implementation in most cases. Typically when objects akin >> to Map or Array are exposed in a platform API, mutating them has >> observable (synchronous

Re: URLs / subclassing JavaScript

2012-12-18 Thread Allen Wirfs-Brock
On Dec 18, 2012, at 8:08 AM, Anne van Kesteren wrote: > On Tue, Dec 18, 2012 at 4:32 PM, Alex Russell wrote: >> Object.observe() is a notification, not interception, mechanism. Where we >> need to stratify an intercept, ES 6 Proxies are the mechanism we should lean >> on, but in the main, we sho

Re: URLs / subclassing JavaScript

2012-12-18 Thread Anne van Kesteren
On Tue, Dec 18, 2012 at 4:32 PM, Alex Russell wrote: > Object.observe() is a notification, not interception, mechanism. Where we > need to stratify an intercept, ES 6 Proxies are the mechanism we should lean > on, but in the main, we should ALWAYS seek to avoid using them. That is to > say, if we

Re: URLs / subclassing JavaScript

2012-12-18 Thread Alex Russell
hey Anne, Sam! Comments inline: On Monday, December 17, 2012, Sam Tobin-Hochstadt wrote: > On Mon, Dec 17, 2012 at 9:19 AM, Anne van Kesteren > > > wrote: > > If down the road we want to allow for the theoretical possibility of > > having all platform APIs implemented in JavaScript, we might wan

Re: URLs / subclassing JavaScript

2012-12-17 Thread Sam Tobin-Hochstadt
On Mon, Dec 17, 2012 at 9:19 AM, Anne van Kesteren wrote: > If down the road we want to allow for the theoretical possibility of > having all platform APIs implemented in JavaScript, we might want a > sync Object.observe. If we have types down the road as well (this > might be a bit presumptuous),

Re: URLs / subclassing JavaScript

2012-12-17 Thread David Bruant
Le 17/12/2012 15:56, Anne van Kesteren a écrit : On Mon, Dec 17, 2012 at 3:39 PM, David Bruant wrote: Which part of the platform needs a sync Object.observe? (Thanks for the reply.) Thanks for your post. I think nothing does per se, but it might make manner more convenient. I understand. It

RE: URLs / subclassing JavaScript

2012-12-17 Thread Domenic Denicola
From: es-discuss-boun...@mozilla.org [es-discuss-boun...@mozilla.org] on behalf of Anne van Kesteren [ann...@annevk.nl] Sent: Monday, December 17, 2012 09:56 > By types I mean e.g. constraining set() to just accept strings. I think the "JavaScript-y" way of doing this, as exemplified in the ES5

Re: URLs / subclassing JavaScript

2012-12-17 Thread Anne van Kesteren
On Mon, Dec 17, 2012 at 3:39 PM, David Bruant wrote: > Which part of the platform needs a sync Object.observe? (Thanks for the reply.) I think nothing does per se, but it might make manner more convenient. > I don't understand what you mean by "types". And I also don't understand > what you can

Re: URLs / subclassing JavaScript

2012-12-17 Thread David Bruant
Le 17/12/2012 15:19, Anne van Kesteren a écrit : If down the road we want to allow for the theoretical possibility of having all platform APIs implemented in JavaScript, we might want a sync Object.observe. Which part of the platform needs a sync Object.observe? I feel all platform APIs can be i

URLs / subclassing JavaScript

2012-12-17 Thread Anne van Kesteren
If down the road we want to allow for the theoretical possibility of having all platform APIs implemented in JavaScript, we might want a sync Object.observe. If we have types down the road as well (this might be a bit presumptuous), URLQuery could just be a MultiMap and whenever the MultiMap was mu