[gclist] Re: gclist-digest V1 #42

Bill Bill GuillermoJ.Rozas
Fri, 19 Apr 1996 13:34:53 -0700


|   Sender: majordom@iecc.com (MajorDomo)
|   Date: Fri, 19 Apr 1996 15:50:54 -0400
|   From: bobduff@world.std.com (Robert A Duff)
|   Precedence: bulk
|   Reply-To: gclist@iecc.com
|   Errors-To: owner-gclist@iecc.com

|   Suppose the above crashes during the first iteration.  That does *not*
|   prove that the system has no gc -- maybe the system just doesn't have
|   enough memory.  Suppose it doesn't crash after "many" iterations.  That
|   doesn't prove it *does* have gc -- maybe it just has lots of memory, and
|   maybe if you had been willing to wait for one more iteration, it would
|   have crashed.  In practise, you can know how much memory is on a
|   particular machine, and write the above test accordingly, but *language*
|   *definitions* don't normally say anything about how much memory is
|   available.

However, it is not difficult to add a measure of memory usage to a
language definition.  This can be done in terms of abstract units so
that proportionality constants can be accepted.  Any implementation
that uses less abstract storage than that specified by the language
semantics is acceptable, but one that uses more would not.

I can envision a situation where a language definition defines N
parameters for different situations that require dynamic memory.
An actual implementation could then give values to each of the N
parameters in units relevant to the machine at hand.

GC could then be specified quite accurately and independently of
representation, with respect to memory usage of the abstract
definition.

The same is true for "true tail recursion".

However, the informal definition should be adequate.

|   One way to get language implementers to support gc is to *not* put any
|   manual storage-freeing operation in the language.  For a language like
|   C++, I don't think the right approach is to put words in the language
|   standard.  The right approach is to produce enough implementations that
|   support gc that everybody is eventually forced to do so, or go out of
|   business.  In other words, a de-facto standard is more appropriate for
|   this.  Once people actually *use* gc (if it's any good), they tend to
|   *like* it.

Didn't Pascal try this?  I seem to recall that there was new but no
way to get rid of such structures.  Implementations provided different
mechanisms (dispose, mark/release, etc.), but to my knowledge none of
them implemented a true gc.