comp.lang.ada
 help / color / mirror / Atom feed
* Re: When to run "exit" code
       [not found] <24559@mimsy.umd.edu>
@ 1990-05-25 16:00 ` stt
  0 siblings, 0 replies; only message in thread
From: stt @ 1990-05-25 16:00 UTC (permalink / raw)



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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1990-05-25 16:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <24559@mimsy.umd.edu>
1990-05-25 16:00 ` When to run "exit" code stt

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