comp.lang.ada
 help / color / mirror / Atom feed
From: stt@inmet.inmet.com
Subject: Re: When to run "exit" code
Date: 25 May 90 16:00:00 GMT	[thread overview]
Message-ID: <20600046@inmet> (raw)
In-Reply-To: 24559@mimsy.umd.edu


Re: writing "exit-time code" in Ada83

Using priority to accomplish "exit code" (a.k.a. finalization)
is non-portable, but will probably work in most mono-processor
implementations.  I have seen a few other clever tricks, but
have unfortunately forgotten them (there might be someone
out there on the net with some clever scheme).

I know that a number of compilers have a library-level cleanup
mechanism, used by their own RTS to close files, etc.  You might
be able to plug into one of those (still non-portable) mechanisms.

In any case, general "finalization" emerged quite early
in the Ada9X process as a useful enhancement to Ada.  We are considering
it quite seriously.  When combined with exception handling,
abort, terminate, etc., it is far from trivial to define
and efficiently implement, but we are trying...  

C++ has it now, but alas, they
don't have those other things (exceptions, etc.).  Now that
Bjarne Stroustrap is considering adding exceptions to C++, I am sure
he will have some interesting things to say about the interactions
with finalization (aka "destructors" in C++).

S. Tucker Taft
Ada9X Mapping/Revision Team
Intermetrics, Inc.
Cambridge, MA  02138

           reply	other threads:[~1990-05-25 16:00 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <24559@mimsy.umd.edu>]
replies disabled

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