linear-time weak-map gc
dherman at mozilla.com
Sun Mar 20 18:53:23 PDT 2011
> typically this is seen as a quality of implementation issue. Note the we (and most other language specs.) don't say much (or anything) about GC in general. In one sense we don't need to say anything else about WeakMaps because it would be a lower quality implementation to retain objects in one that are provably not accessible. However, because of the long history of such poor implementations we need to say say just enough to make it clear what we expect.
> It is something I'm sure I can draft when the time comes, but it isn't the most pressing matter.
Sure. I shouldn't have caused a diversion about what goes in the spec. I have a reasonably clear picture of how to do it anyway.
I am still curious how people write tests to evaluate the quality of weak references. Obviously you can expose lower-level, non-standard API's that provide metrics, but I wonder if there's any way to write standard code that tests weakly held data. I'm guessing there isn't. Again, this isn't pressing.
More information about the es-discuss