Re: WeakMap not the weak needed for zombie views

2014-07-07 Thread Jussi Kalliokoski
To first address the particular case of using weak maps for custom event listeners via iteration: I think the only relatively sane approach to iterating a WeakMap would be to force GC whenever the WeakMap is being iterated. This would make sure that you couldn't get references to items that are

Re: WeakMap not the weak needed for zombie views

2014-07-07 Thread Katelyn Gadd
Jussi, one thing about your (totally correct) statements here is that you're addressing this from the perspective of 'I want to observe GC reliably from user code'. But that's not really what is desired in most cases. For example, forcing a GC whenever iterating the weakmap would ensure you don't

Re: WeakMap not the weak needed for zombie views

2014-07-07 Thread Till Schneidereit
I largely agree with your arguments, but one point is actually more of a counter argument to having weakrefs: On Mon, Jul 7, 2014 at 10:41 AM, Katelyn Gadd k...@luminance.org wrote: Similarly, it's important to realize that while some use cases for weakrefs are about managing native resources

Re: WeakMap not the weak needed for zombie views

2014-07-07 Thread Katelyn Gadd
On Mon, Jul 7, 2014 at 2:05 AM, Till Schneidereit t...@tillschneidereit.net wrote: While this is true, I think that, as others have argued in the discussion thread I linked to and elsewhere, weakrefs are a bad solution for this. The GC cannot distinguish between different types of resources and

Re: WeakMap not the weak needed for zombie views

2014-07-07 Thread Till Schneidereit
On Mon, Jul 7, 2014 at 11:21 AM, Katelyn Gadd k...@luminance.org wrote: On Mon, Jul 7, 2014 at 2:05 AM, Till Schneidereit t...@tillschneidereit.net wrote: While this is true, I think that, as others have argued in the discussion thread I linked to and elsewhere, weakrefs are a bad solution

Re: WeakMap not the weak needed for zombie views

2014-07-07 Thread Jussi Kalliokoski
On Mon, Jul 7, 2014 at 12:44 PM, Till Schneidereit t...@tillschneidereit.net wrote: Ah, no, you didn't - I misunderstood your argument and did indeed think it was about caching. I'm still hesitant about this particular argument because it seems like your framework would still have issues with

Re: ES6 classes: deferring the creation step

2014-07-07 Thread Kevin Smith
1. During phase /* 1 */, the this-binding is uninitialised; trying to access it through an explicit `this` keyword will throw a ReferenceError. This seems overly restrictive to me. The common case (as in ES5) will be classes that derive from Object, where no such restriction is

Re: Trailing comma for function arguments and call parameters

2014-07-07 Thread Dmitry Soshnikov
On Sun, Jul 6, 2014 at 10:36 PM, Isiah Meadows impinb...@gmail.com wrote: My responses are inline. From: Alex Kocharin a...@kocharin.ru To: Oliver Hunt oli...@apple.com, Dmitry Soshnikov dmitry.soshni...@gmail.com Cc: es-discuss es-discuss@mozilla.org Date: Sun, 06 Jul 2014 12:07:09

Re: Trailing comma for function arguments and call parameters

2014-07-07 Thread Brendan Eich
Oliver Hunt wrote: On Jul 3, 2014, at 3:52 PM, Dmitry Soshnikovdmitry.soshni...@gmail.com wrote: Hi, Will it makes sense to standardize a trailing comma for function arguments, and call parameters? We have it for Array and Object initialisers, and people like using them for long