I do think that we need weak references for all the reasons given in the proposal. But indeed non-determinism is a concern. The reference Dominic pointed at is one of two primary (areas of) considerations. The other is just how many amazing things you can do if turns are deterministic (more reliable testing, replay debugging, checkpoint/retry in the event of component failure, simpler correctness analysis on code, etc.).
Exposing non-determinism only at turn boundaries and controlling access to the ability to observe GC both help some with the first motivation above (and a lot with the second). However, not enough. I'm hoping to make another run at weakrefs in November with some changes to help concern #1 further. On Fri, Oct 20, 2017 at 7:54 AM, Filip Pizlo <[email protected]> wrote: > > > > On Oct 20, 2017, at 7:45 AM, Mike Samuel <[email protected]> wrote: > > > >> On Fri, Oct 20, 2017 at 10:33 AM, Filip Pizlo <[email protected]> wrote: > >> For what it’s worth, I have never agreed with this policy. This policy > seems > >> to be based on feelings not facts. > >> > >> I remember implementing real time GCs for Java, which changed GC timing > and > >> behavior a lot, and having zero problem getting that aspect of the GC to > >> work well with existing code. It seems like we are using non-problems to > >> make excuses to avoid supporting something useful. > >> > >> In fact, WeakMap is more restrictive constraint on GC algo than weak > refs or > >> finalization or whatever, since it means that a Siebert-style > fine-grained > >> incremental GC with O(1) increments is off the table. > > > > I'm not familiar with Siebert GCs so I apologize if this is beside > > your point. My recollection of those discussions was that we > > rejected weak refs in favor of ephemerons because weak references are > > still prone to uncollectible cycles that involve a weakly referenced > > object being used as both a key and a value. > > It’s better to have both. Some use cases are not covered by WeakMap, as > evidenced by the fact that people still ask for weak refs or a gc trigger > or notification. > > -Filip > > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

