linear-time weak-map gc
dherman at mozilla.com
Sun Mar 20 08:20:04 PDT 2011
> It's weird, though--specifying anything about WeakMap reachability at
> all is a lot like specifying proper tail calls: it's hard to say what
> you mean without being a lot more concrete about the abstract machine
> the language runs on than you would be otherwise. The real requirement
> is simply that the WeakMap not observably consume space for entries
> that can't be queried. Maybe we could just say that.
Yeah. The perfect is the enemy of the good when it comes to specifying these kinds of features. We don't have a formal semantics for the rest of the language anyway, so we shouldn't be aiming for a formal cost model, too. Instead I think we need a combination of as-precise-as-reasonably-possible informal English in the spec with the best tests we can come up with for evaluating implementations.
More information about the es-discuss