[Caja] GC of name objects in ES3.1

David-Sarah Hopwood david.hopwood at industrial-designers.co.uk
Thu Oct 9 18:04:12 PDT 2008


Mike Samuel wrote:
> Mark,
> 
> Do you know if the ES3.1 spec specifies GC behavior around Name objects that
> are not referenced from any reachable or executing functions' scope chains,
> and are not a key for any enumerable property?

Typically language specs don't normatively specify GC behaviour, because
it isn't observable except for the effect on memory usage, and they
don't specify memory usage. But it does deserve a footnote, IMHO.

In Erlang, atoms are not GC'd, and this leads to all kinds of ugly
workarounds. This behaviour is widely considered to be a wart, and there
is a proposal to fix it: <http://www.erlang.org/eeps/eep-0020.html>.
(That document mainly discusses implementation in Erlang/OTP, but the
motivation and rationale sections are relevant.) It would be nice not
to repeat this mistake in ECMAScript.

> If not, is this an issue that should be raised on one of the es*-discuss
> lists?

Cc: and Reply-To: set to es-discuss.

-- 
David-Sarah Hopwood


More information about the Es-discuss mailing list