Newsgroups: comp.lang.ada
Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!linus!linus!linus!mbunix!eachus
From: eachus@largo.mitre.org (Robert I. Eachus)
Subject: Re: Ada 9X Mapping
In-Reply-To: tedg@apollo.HP.COM's message of 9 May 91 18:46 GMT
Message-ID: <EACHUS.91May14230809@largo.mitre.org>
Sender: news@linus.mitre.org (News Service)
Nntp-Posting-Host: largo.mitre.org
Organization: The Mitre Corp., Bedford, MA.
References: <1991Apr15.144021.12618@aero.org| <jls.671848656@rutabaga>
	<72071@microsoft.UUCP> <1991May9.055530.1516@netcom.COM>
	<5176c098.20b6d@apollo.HP.COM>
Date: 14 May 91 23:08:09

In article <5176c098.20b6d@apollo.HP.COM> tedg@apollo.HP.COM (Ted Grzesik) writes:

   I worked on a large Ada program (an Ada compiler, to be precise) that used 
   lots of UNCHECKED_CONVERSION and UNCHECKED_DEALLOCATION.  Once you've 
   introduced these two routines into your program, you're just writing fancy 
   C code.  Using these routines indicates either a flaw in your design or a
   limitation of the Ada language.  Usually, it's a flaw in the design.

   Not really.  What indicates a problem is when UNCHECKED_CONVERSION
or UNCHECKED_DEALLOCATION appears in a package specification, rather
than hidden in a body, hopefully a procedure body.  For years, I have
called UNCHECKED_CONVERSION in a library package specification
UNCHECKED_PERVERSION, since it usually destroys the data independence
of both input and output types.  The cost of putting the instantiation
in the body of a procedure is small (and on a good compiler it will
just be the cost of writing additional code, not executing it), but
the difference in portability can be night and day.

--

					Robert I. Eachus

with STANDARD_DISCLAIMER;
use  STANDARD_DISCLAIMER;
function MESSAGE (TEXT: in CLEVER_IDEAS) return BETTER_IDEAS is...
