Re: Ada GC (Henry Baker)
29 Jan 1996 23:25:57 -0500

          From comp.compilers

Related articles
Re: Possible to write compiler to Java VM? (1996-01-29)
Re: Possible to write compiler to Java VM? (1996-01-29)
Re: Ada GC (1996-01-29)
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)
[20 later articles]
| List of all articles for this month |

From: (Henry Baker)
Date: 29 Jan 1996 23:25:57 -0500
Organization: nil organization
References: 96-01-100 96-01-115
Keywords: Ada, GC, comment

Henry Baker ( wrote:
: However, the single most important reason why Java is a _much_ better
: language than Ada-95 is the fact that Java does garbage collection and
: Ada does not. (Tucker Taft) wrote:
> Actually, AdaMagic/Java does use garbage collection. The Ada 95
> standard does not mandate garbage collection, but it does allow it.
> And the AdaMagic/Java implementation takes advantage of that
> allowance.

(Tucker & I have discussed this issue ad nauseum, so I don't think
anything I say here about Ada will come as any surprise to him.)

Ada83 did not mandate garbage collection, but allowed it. However,
the only implementations I can think of that had GC were the AdaEd
interpreter, and the Symbolics version, and I'm not sure whether the
Symbolics version was ever worked on enough to collect all of its
garbage. (It passed the certification test, but since GC wasn't
required, the GC code obviously wasn't tested by the certification

> Probably even the Java standard, were it to exist, could not easily
> mandate any particular kind of garbage collection. In this sense, Ada
> 95 and Java would be similar. The difference is that there exists a
> reference Java implementation that provides reasonable garbage
> collection (albeit probably not acceptable for real-time
> applications), and garbage collection is presumed to exist by Java
> programmers.

And that makes all the difference. A strong 'de facto' standard will
beat an imposed standard any day of the week.

> Until the real-time and safety-critical community embraces garbage
> collection, Ada clearly must support "manual" storage management. I
> might believe that their concerns about garbage collection are not
> "technically defensible," but that doesn't change the fact of their
> concerns.

Many of the complaints I heard from the real-time community were about
Ada implementations with _storage leaks_ (type safety is pretty good
in Ada, so that complaint wasn't heard very much, contrary to the
situation in the C/C++ community). A real-time system won't run
terribly long if it constantly leaks storage. Since GC is an
excellent way to stop storage leaks, I suspect that they would be
thrilled if they were provided with a GC that solved this leak

Both Tucker & I have both written papers about how to do storage
management in Ada, and whether automatic or manual, it doesn't matter
-- Ada makes it nearly impossible to control what is going on, because
they didn't standardize the interface to the lower levels of the OS
interface and the I/O.

People want to _control_ storage management, but they don't want to
_do_ it themselves, because they know that they make mistakes. One
can have GC's with 'reflective' interfaces to control them -- how do
you think that large Lisp operating systems ever worked?

> Ada 83 tried to impose a particular task synchronization
> model on the real-time community (rendezvous), and never convinced a
> large portion of them.

That's because a) the model was never tested in any other language
before springing full-born from the brow of Zeus, and b) once people
tested it, they found that it sucked.

> To try to impose the garbage-collection model of storage management
> at this stage on the same community would be a similarly doomed
> effort.

Big difference. By the time Ada83 came out, the computer science
community had already had 23 years of experience with garbage

> Perhaps in 200x, with a decade of experience with implementations
> like AdaMagic/Java, Java itself, concurrent Eiffel (presuming it
> becomes widely available), Modula-3, etc., which attempt to address
> real-time programming while providing garbage collection, it will be
> feasible to banish support for manual storage management. But only
> time will tell.

No one wants to 'banish' manual storage management -- they want it to
coexist peacefully with GC and other approaches. But if Ada doesn't
start leading instead of following, her days are numbered.

However, in death, Ada may finally ease the incredible pain and
suffering that has racked her body ever since she was born.

Ada's parents had a devil of a time getting pregnant in the first
place. They consulted all sorts of witch doctors and spent millions
of dollars on fertility drugs. In the end, Ada's mother got pregnant
with quadruplets. However, in order to save Ada, the other three
siblings were sacrificed. Some say that Ada may have been the ugliest
of the litter.

Ada was born prematurely, with profound birth defects, and had to
spend the first 7 years on life support, and had to have several major
operations which cost hundreds of millions of dollars. Even then, she
had trouble breathing on her own, and due to her crippling
disabilities had to have lots of expensive prosthetics. She was fat,
ugly -- a kind of female 'Elephant Man'. Many doctors had pity on her
and provided her free medical care, but their efforts financially
ruined their medical practises.

Ada spent the next several years living in a foster home, because her
parents had abandoned her. They professed to care, but gave most of
Ada's Christmas presents to Cecilia, the neighborhood slut. Ada
performed simple tasks like basket-weaving which passed the time, and
gave her something to make herself feel useful. Within the walls of
this protected environment, Ada could avoid other children poking fun
at her disabilities and diapers.

More recently, her parents decided that if they could give her a
little plastic surgery, they could make her more beautiful, and
perhaps some prince in shining armor would sweep her off her crutches
and start paying for her medical bills. The decision was made to try
to make her look more like Cecilia -- or more correctly, the way
Cecilia looked after _her_ plastic surgery.

We don't know yet whether Ada's surgery will achieve the desired
purpose, but it should be known that beneath those pretty petticoats
are some very crippled limbs on a still-fat body dressed in Depends.
www/ftp directory:
[There's no question, Henry wins the metaphor of the month award. -John]

Post a followup to this message

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