comp.lang.ada
 help / color / mirror / Atom feed
From: eachus@largo.mitre.org (Robert I. Eachus)
Subject: Re: Ada 9X Mapping
Date: 14 May 91 23:08:09	[thread overview]
Message-ID: <EACHUS.91May14230809@largo.mitre.org> (raw)
In-Reply-To: tedg@apollo.HP.COM's message of 9 May 91 18:46 GMT

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...

  reply	other threads:[~1991-05-14 23:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1991Apr15.144021.12618@aero.org| <jls.671848656@rutabaga>
1991-04-28 21:51 ` Ada 9X Mapping James THIELE
1991-05-09  5:55   ` Jim Showalter
1991-05-09 18:24     ` Larry M. Jordan
1991-05-09 18:46     ` Ted Grzesik
1991-05-14 23:08       ` Robert I. Eachus [this message]
1991-04-15 14:38 byrne
1991-04-17  0:37 ` Jim Showalter
1991-05-22 19:48   ` Ada9X Report to the Public Michele L. Kee
1991-05-22 19:53   ` Air Force's Interpretation of Ada "Cost Effective Policy" Michele L. Kee
replies disabled

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