comp.lang.ada
 help / color / mirror / Atom feed
* Re: Garbage collection (was a spinoff of a spinoff of a GA
@ 1996-10-17  0:00 W. Wesley Groleau (Wes)
  1996-10-20  0:00 ` Robert A Duff
  0 siblings, 1 reply; 10+ messages in thread
From: W. Wesley Groleau (Wes) @ 1996-10-17  0:00 UTC (permalink / raw)



Robert Dewar says:

:> Wes says
:>
:> "And with composites, the provider of the data type has the complete freedom
:> of choice to extend a controlled type with GC, extend a controlled type
:> without GC, or not use a controlled type.
:>
:> So, compared to the above, how big is the payoff of having GC imposed on
:> you by the implementation?"
:>
:> I don't think it is quite that simple. There is nothing to prevent a
:> compiler having....

You are refuting a claim I didn't make.  My QUERY was, "Since Ada now
lets us customize garbage collection (or lack of) to each ADT, how many
_Ada_ designers would be willing to pay extra for a reliable transparent
global GC?"  I doubt that any would be willing to pay for one that is
unreliable or non-transparent.

Part of the Ada philosophy (at least for me) is that if something is a
requirement, I want to see it somewhere in code.  If it isn't a requirement,
I don't want it cluttering the code AND I don't want it interfering with
requirements (including cost and schedule requirements).

"see it somewhere in code" can be satisfied by adequate guarantees from
a vendor or from testing that the requirement is met.  Can obtaining those
guarantees be easier than properly engineering one's ADTs?  Is this another
hazard comparable to "reuse without review"?  (Please don't resurrect
Ariane 5 :-)

---------------------------------------------------------------------------
W. Wesley Groleau (Wes)                                Office: 219-429-4923
Hughes Defense Communications (MS 10-40)                 Home: 219-471-7206
Fort Wayne,  IN   46808                  (Unix): wwgrol@pseserv3.fw.hac.com
---------------------------------------------------------------------------




^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: Garbage collection (was a spinoff of a spinoff of a GA
@ 1996-10-21  0:00 W. Wesley Groleau (Wes)
  1996-10-22  0:00 ` Jon S Anthony
  0 siblings, 1 reply; 10+ messages in thread
From: W. Wesley Groleau (Wes) @ 1996-10-21  0:00 UTC (permalink / raw)



It looks like Jon Anthony attempted to answer my question
in a post that never got to me.  And if you were to believe Alta Vista
you'd think neither Jon nor I ever posted on the subject!

But I DID see Jon's
> Second, none of this [finalization] stuff covers all the cases.  ....
> doesn't.  And, even if it were to work for the particulars of a
> specific application, you still have to go and roll your own stuff and
> make sure it is all correct and whatnot.  None of this is particularly
> incomprehensible.

Let me put my question another way:

What are the pros and cons of the following three choices?

Choice One (in the spec):
  Declare a data type.  Put a comment on it saying
  -- Make sure you put calls to the cleanup routines in in every place
  -- where an object of this type might leave scope.  Make sure you
  -- put an exception handler in every routine that declares one of these,
  -- or else ensure that no exception can occur.  And better guarantee that
  -- exceptions cannot occur in declarative regions.

Choice Two (in the spec):
  -- If you intend to use this data type, you had better ensure that your
  -- compiler has a good garbage collector, or get an add-on that can
  -- work with your compiler's allocation methods.

Choice Three (in the BODY):

   procedure Finalization (...) is
   -- this will ensure that cleanup cannot be forgotten.

What are the cases Finalization doesn't cover?  (Other than those the
programmer DECIDED not to apply it to.)

And what is so hard about "roll your own"?  After all this argument about
how and why this and that type of collector can bite you on the behind,
how can anyone complain that

   begin
     Free (Param);
   end Finalization;

is so difficult.  Sure, the compiler might fail to call it, but we have
better ways of dealing with naughty compilers than adding on outside tools
of arguable value.

---------------------------------------------------------------------------
W. Wesley Groleau (Wes)                                Office: 219-429-4923
Hughes Defense Communications (MS 10-40)                 Home: 219-471-7206
Fort Wayne,  IN   46808                  (Unix): wwgrol@pseserv3.fw.hac.com
---------------------------------------------------------------------------




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~1996-10-25  0:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-10-17  0:00 Garbage collection (was a spinoff of a spinoff of a GA W. Wesley Groleau (Wes)
1996-10-20  0:00 ` Robert A Duff
1996-10-21  0:00   ` Michael F Brenner
1996-10-21  0:00     ` Robert A Duff
1996-10-21  0:00     ` Garbage collection (was a spinoff of a spinoff of a GA diatribe) Robert Dewar
1996-10-21  0:00     ` Garbage collection (was a spinoff of a spinoff of a GA Larry Kilgallen
  -- strict thread matches above, loose matches on Subject: below --
1996-10-21  0:00 W. Wesley Groleau (Wes)
1996-10-22  0:00 ` Jon S Anthony
1996-10-25  0:00   ` Jon S Anthony
1996-10-25  0:00   ` Robert I. Eachus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox