guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: thoughts on targetting the web


From: Chris Lemmer-Webber
Subject: Re: thoughts on targetting the web
Date: Sun, 20 Jun 2021 10:14:55 -0400
User-agent: mu4e 1.4.15; emacs 27.2

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.)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]