xanadu & forth

Jecel Assumpcao Jr jecel@merlintec.com
Fri, 29 Oct 1999 12:22:01 -0200

Tom Novelli wrote:
> On Thu, 28 Oct 1999, Jecel Assumpcao Jr wrote:
> > [what if we just keep everything?]
> I noticed a parallel in Forth: when you create new words (ie, objects),
> they just get piled onto the heap.  If you redefine a word, the old
> definition stays in memory.  No garbage collection.  You want to make
> something temporary, don't mix it up with permanent stuff.

There is a good reason to do the dictionary this way in Forth: if
you redefine a word, everybody that used the previous definition
continues to do so. This avoids breaking code that was working
before and other nasty surprises. On the other hand, it makes
fixing bugs in words you have written a *very* frustrating

> Just another indication that GC is nothing to worry about... don't write
> garbage, and you won't need garbage collection :)

An alternative to GC is to use Linear Logic (see the "Lively Linear
Lisp--'Look Ma, No Garbage!'" paper and others at:


Well, it is actually that if there can only be one reference to
each object, it is easy to tell when the last one has gone away...

-- Jecel