Brendan,

After talking it through with more people, I don't think weak event
listeners are safer than full WeakRefs. So I retract that suggestion.

However, I've become unconvinced by the data binding use case. Yehuda
Katz and I discussed it, and after some pointed questions, he gave up,
saying "in all seriousness I don't have time to fight for someone else's
use-case [...] honestly, I write declarative systems that don't have
this problem [...] so the person who has the problem can argue for it".

I'm left looking for that person. Got any leads?

WeakRef use cases seem to boil down to backstopping certain kinds of
memory leaks, particularly leaks of event listeners and their downstream
"light-cones" ("leak the world" bugs). I claim TC39 shouldn't take this
feature in order to address memory leaks. The cure would be worse than
the disease. Also, we don't know what proportion of leaks it could fix
even in theory.

-j

_______________________________________________
dev-tech-js-engine-internals mailing list
dev-tech-js-engine-internals@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-js-engine-internals

Reply via email to