Newsgroups: alt.lang.design,comp.lang.c,comp.lang.c++,comp.lang.lisp
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!udel!gatech!swrinde!cs.utexas.edu!uunet!maunakea!kurt
From: kurt@Data-IO.COM (Kurt Guntheroth)
Subject: Re: Reference Counting (was Re: Searching Method for Incremental Garbage Collection)
Message-ID: <D14nnn.DqM@maunakea.Data-IO.COM>
Sender: usenet@maunakea.Data-IO.COM (The News)
Nntp-Posting-Host: rabies
Organization: Data I/O Corporation
References: <3boujh$o0c@news.parc.xerox.com> <JYL.94Dec9160456@yael.eng.sun.com> <1994Dec13.150511.11881@mole-end.matawan.nj.us>
Date: Tue, 20 Dec 1994 20:59:47 GMT
Lines: 23
Xref: glinda.oz.cs.cmu.edu comp.lang.c:121497 comp.lang.c++:104271 comp.lang.lisp:16118

In article <1994Dec13.150511.11881@mole-end.matawan.nj.us> mat@mole-end.matawan.nj.us writes:
>the `need' for GC arises when (a) a _value_ is represented
>using an indefinite number or selection of _objects_ and (b) there is no
>relationship established between a given value representation and the
>activity which (may) need it.

So, all we have to do is guarantee that the dynamic scope of reference to an
object matches the intended lifetime of the object.  That is, all we have to
know (at all times) is what reference will be the last one.

That means, even in a large system, we have to have in our heads (or in
our formal methods if we're really special programmers) the dynamic live
lifetime of *every single reference*, and a means of predicting which
reference will be last (dynamically, because it may change at run time).

How many readers think this information could easily get out of hand, even
in a well written system?  (Yes, there are trivial cases where it's easy.)

You "need" GC when this information gets complex enough that you (the
programmer, not the theorem prover) cannot reliably guarantee the last
reference can be predicted.  But as another reader pointed out, you can
"use" garbage collection much sooner, as a means to stop having to think
about this detail.
