Re: Ada GC (Robert Dewar)
4 Feb 1996 01:02:00 -0500

          From comp.compilers

Related articles
[2 earlier articles]
Re: Ada GC (was about Java VM) (1996-02-01)
Re: Ada GC (1996-02-02)
Re: Ada GC (1996-02-02)
Re: Ada GC (1996-02-03)
Re: Ada GC (1996-02-04)
Re: Ada GC (1996-02-04)
Re: Ada GC (1996-02-04)
Re: Ada GC (1996-02-04)
Re: Ada GC (1996-02-04)
Re: Ada GC (Ken & Virginia Garlington) (1996-02-04)
Re: Ada GC rogoff@sccm.Stanford.EDU (1996-02-09)
Re: Ada GC lph@SEI.CMU.EDU (1996-02-09)
Re: Ada GC (1996-02-09)
[15 later articles]
| List of all articles for this month |

From: (Robert Dewar)
Newsgroups: comp.compilers,comp.lang.ada
Date: 4 Feb 1996 01:02:00 -0500
Organization: Courant Institute of Mathematical Sciences
References: 96-01-037 96-02-003 96-02-023 96-02-028
Keywords: Ada, GC, realtime

Jay Martin said

"I agree that Ada83 compilers were supposed to have GC, its just that
the compiler writers slacked-off. And I think that customers didn't
want GC is a silly notion. I remember everyone saying "where's the
GC?" Its just that the compiler writers were struggling with all the
language features (like generics), getting performance and validation
and all the problems that come from making a compiler for an obese
language. Nobody implemented GC, thus you can't rely on it for
portable code, thus you didn't use it, thus there was no pressure to
implement it, ...."

Robert replies

I don't know what compiler vendor Jay worked for in the early 80's,
but if he heard customers asking for garbage collection (I mean real
customers with money), I sure did not see them around, and I *still*
do not see them around. As I noted in an earlier note, we have had
many serious and interesting requests for enhancement of GNAT from
serious users, but not one such user has even suggested garbage
collection as a useful addition.

It is not "slacking-off" to listen to your customers and implement
what they want to see. For example, I think far more customers were
interested in bindings to standard libraries than GC.

It is also telling that the ISO C++ standard, which is C++ plus a
number of significant additions that people felt were essential, does
not include GC, and as far as I know there was no significant pressure
for this addition.

Language design is a bit like politics, you always get a few one-issue
fanatics around whose viewpoint is that entier your language includes
feature X or it is rubbish. I have heard such comments on Ada for
nearly all possible X's that are not in Ada 95. As an example, there
is someone around, I apologize for forgetting who, who insists that
the failure of Ada to include full closures is such a fatal omission,
and there is someone else who is equally convinced that Ada 95 is
completely decrepit because it lacks type inference.

There is nothing wrong with fanaticism in a good cause (e.g. the
abolitionist movement in the states). But the job is to convince the
community at large to adopt your point of view. Unfortunately in the
case of GC, this job has not been completed. Sometimes these things
take a long time. After all object oriented programming was well
established in the late 60's (the language is Simula 67 remember?) and
it took a good twenty years for a consensus to develop!

I must say that, having gone through the effort of implementing the
finalization features of Ada 95, I would guess that full GC could have
been implemented with much less effort, and for many purposes it would
clearly be preferable. I also wonder if people really appreciate the
overhead that comes from free use of finalization. Programs that use
unbounded_string heavily can surprise themselves with the overhead

(In GNAT, use the -gnatdg switch to get an idea of what is really
  being generated. We are by no means generating the best possible
  code, but much of what is generated is unavoidable!)

Jay ends by saying:

  "I want GC. It would be cool if ARPA would fork over the bucks to put
    GC in GNAT."

Hmmm! I am afraid that being willing to use something if the
government will pay for it is not the same as being a real customer

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.