Garbage collection of atoms

James Hague <>
Tue Nov 2 15:43:44 CET 1999


On 2 Nov 1999, Sebastian Strollo wrote:
> 
> It wouldn't be too hard to add a really stupid (i.e. inefficient) atom
> gc, this could provide input to the question if it is really
> needed. Sure it would be a nice feature, it really is one of those
> things which always has been discussed but never implemented. Could it
> be because the need for it hasn't been that great?

I can see that lack of garbage collection for atoms wouldn't major problem
for the types of applications that Erlang was originally intended for, but
atoms are really handy for traditional AI programming.  When doing
something like natural language parsing or pattern matching, it's much
nicer to deal with dense lists of atoms--[the, cat, jumped, over, the,
dog]--as opposed to lists of characters.  See Norvig's excellent
_Paradigms of Artificial Intelligence Programming_ for many good examples
of this style.

With a high enough limit on the number of atoms, though, garbage
collection would only rarely be necessary (I don't know what the current
limit is).  Even having to manually invoke atom collection would be a
reasonable solution.

James




More information about the erlang-questions mailing list