Re: [Harmony proxies] add receiver as a first argument to all prototype-climbing traps

2011-04-07 Thread Tom Van Cutsem
2011/4/5 David Bruant david.bru...@labri.fr Le 05/04/2011 10:22, Tom Van Cutsem a écrit : (...) If a browser does not support Object.freeze, seal or preventExtensions, it likely does not support fixing proxies either. Calling the fix() trap explicitly via Proxy.trap would still not

Re: ECMAScript Object equivalence classes proposal

2011-04-07 Thread Brendan Eich
On Apr 3, 2011, at 11:12 AM, Allen Wirfs-Brock wrote: On Apr 2, 2011, at 5:11 PM, Brendan Eich wrote: Is multiple inheritance a use case that TC39 intends to address in a generic manner? No. Inheritance-based instanceof testing for the purpose of dynamic classification of objects is

Re: ECMAScript Object equivalence classes proposal

2011-04-07 Thread Brendan Eich
On Apr 5, 2011, at 2:19 PM, David Bruant wrote: What I'm worried about is the memory cost of such an implementation. The current [[HasInstance]] implementation has a constant memory cost. Keeping references has a linear memory cost in terms of instance number. My favorite real-world

Re: [Harmony proxies] add receiver as a first argument to all prototype-climbing traps

2011-04-07 Thread Brendan Eich
On Apr 7, 2011, at 7:49 AM, Tom Van Cutsem wrote: But again, I would hope that an implementation that supports both Object.freeze + proxies just supports freezing proxies via the fix() trap as per the draft spec. I don't see the need for such an implementation to additionally provide an

Re: A few more module questions

2011-04-07 Thread Brendan Eich
On Apr 4, 2011, at 9:51 AM, P T Withington wrote: On 2011-04-04, at 12:40, Sam Tobin-Hochstadt wrote: Renaming: - I find this syntax slightly unintuitive: import Geometry.{draw: drawShape} At first glance this would mean for me: rename drawShape to draw. draw feels to me like the result

Question about Weak Maps

2011-04-07 Thread Mikeal Rogers
Weak Maps seems to have superseded ephemeron tables. They are non-enumerable, does this also exclude any call that gives you an array of the current keys? If this is the case then it excludes the primary use case we have in node for ephemeron tables. I can understand why you might want to

Re: Question about Weak Maps

2011-04-07 Thread Andreas Gal
Why would you want to enumerate the keys in a weak map? Andreas On Apr 7, 2011, at 4:04 PM, Mikeal Rogers wrote: Weak Maps seems to have superseded ephemeron tables. They are non-enumerable, does this also exclude any call that gives you an array of the current keys? If this is the

Re: Question about Weak Maps

2011-04-07 Thread Bradley Meck
long post a while back about the security problems w/ enumeration on weak maps if you search for it. On Thu, Apr 7, 2011 at 6:13 PM, Mikeal Rogers mikeal.rog...@gmail.com wrote: requests come in to a server, you want to stick them in a hash so that you can query the server at any time for all

Re: Question about Weak Maps

2011-04-07 Thread David Herman
[Disclaimer: I'm not an expert at server code. That said...] Don't you generally need to manage the policy for these kinds of requests manually anyway? In particular, you can't actually tell if a user has abandoned their session, since the browser doesn't let you know when that's happened. So

Re: Question about Weak Maps

2011-04-07 Thread Mark S. Miller
Hi Mikeal, I do not yet understand your server example. Perhaps a bit of illustrative code would help? In any case, within memory-safe gc languages, there are several well motivated enhancements of the API of the collector. Several of these are fundamental, in that there is no way to emulate

Re: Question about Weak Maps

2011-04-07 Thread Mark S. Miller
On Thu, Apr 7, 2011 at 9:11 PM, Mark S. Miller erig...@google.com wrote: Hi Mikeal, I do not yet understand your server example. Perhaps a bit of illustrative code would help? In any case, within memory-safe gc languages, there are several well motivated enhancements of the API of the

Re: Question about Weak Maps

2011-04-07 Thread Mark S. Miller
On Thu, Apr 7, 2011 at 9:15 PM, Mark S. Miller erig...@google.com wrote: On Thu, Apr 7, 2011 at 9:11 PM, Mark S. Miller erig...@google.com wrote: Hi Mikeal, I do not yet understand your server example. Perhaps a bit of illustrative code would help? In any case, within memory-safe gc

Re: A few more module questions

2011-04-07 Thread Erik Arvidsson
On Thu, Apr 7, 2011 at 12:20, Brendan Eich bren...@mozilla.com wrote: Fortunately there's a short-hand:  let {draw, move} = GraphixAPIObject; Given this, is there any reason for anything but import ModuleName.* then? -- erik ___ es-discuss mailing