On 12/2/13 2:18 PM, Jason Orendorff wrote: > 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, [...]
The flavor of my pointed questions was like this: Yehuda said that WeakRefs would be a feature "for libraries", and that their internal use could be hidden from end users. He pointed to Ember bindings <http://emberjs.com/guides/object-model/bindings/>. I think this view, that WeakRef nondeterminism can be hidden from end users, is common. But suppose Ember used WeakRefs to implement Ember bindings. That would become visible to end users in the form of things mysteriously no longer working after GC. For example, if you have A bound to B which is bound to C, and B gets collected, then A and C would no longer be bound to each other. More generally, I think this view is just wrong. Lambda doesn't hide general flakiness. Successful use of WeakRefs in pub-sub use cases depends on establishing strong references from all downstream objects that can observe an event to the event listener. Only the end user can know what those downstream objects even are. Yehuda still wants WeakRefs but is not willing to spend a lot of time on a losing battle. -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