Maxime Devos writes: > Andy Wingo schreef op za 19-06-2021 om 22:20 [+0200]: >> 5. Garbage collection. *We should re-use the host GC*. Although it >> would be possible to manage a heap in linear memory, that has >> retention problems due to cycles between the Guile heap and the JS >> heap. > > I could be mistaken (and I haven't written any ECMAScript in a long time), > but I believe ECMAScript doesn't have guardians, gc hooks, weak vectors and > (key, value, key-value) weak hash tables. So, if we re-use the host GC, > that would mean those GC things cannot be used right? > > In that case, it may be a good idea to raise an error at compile time > if some code tries to use these anyways. (I've been using guardians > and weak vectors lately.) > > Greetings, > Maxime
Weakmaps are a thing these days I think: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap Weak vectors, not so sure. (Never used them myself anyway.)