comp.lang.ada
 help / color / mirror / Atom feed
From: stt@houdini.camb.inmet.com (Tucker Taft)
Subject: Re: Ada generics are bad
Date: 1998/04/08
Date: 1998-04-08T00:00:00+00:00	[thread overview]
Message-ID: <Er3vML.BCE.0.-s@inmet.camb.inmet.com> (raw)
In-Reply-To: Er3npt.4sK@array.ca


Glenden Lee (glee@array.ca) wrote:

: Is it just our compiler or are all compilers this dumb... When a package 
: body that contains the body of generic units get changed, all other 
: packages that instantiate the generics must be recompiled as well.  This 
: is contrary to the claim that generics save compilation time as some 
: literature states...

Generics are primarily intended to save (human) programming/testing time, 
not (machine) compilation time.  In some compilers, there is some
degree of code sharing between instantiations, but in many compilers
(both Ada and C++), each instantiation requires its own code,
and generating that code needs to be done anew whenever the generic
itself is changed.  You would be wise to put the source code for
a generic in its own source file (e.g. as a child library unit)
to minimize the likelihood that a change to unrelated code makes
it look like the generic itself has changed.

: That's all... I just wanted to vent some frustration... and besides the 
: compiler is recompiling everything right now just because I did the above...

: G.
: -- 
: Glenden Lee
: Array Systems Computing
: 1120 Finch Avenue West
: North York, Ontario

--
-Tucker Taft   stt@inmet.com   http://www.inmet.com/~stt/
Intermetrics, Inc.  Burlington, MA  USA




  reply	other threads:[~1998-04-08  0:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-04-08  0:00 Ada generics are bad Glenden Lee
1998-04-08  0:00 ` Tucker Taft [this message]
1998-04-09  0:00 ` Anonymous
1998-04-10  0:00 ` Christopher Green
1998-04-10  0:00   ` Brian Rogoff
1998-04-11  0:00   ` Robert Dewar
1998-04-13  0:00     ` Christopher Green
1998-04-13  0:00       ` Matthew Heaney
1998-04-13  0:00         ` Christopher Green
1998-04-13  0:00         ` nabbasi
1998-04-13  0:00           ` future of proprietry source code (was: Ada generics are bad) Fergus Henderson
1998-04-14  0:00             ` David Masterson
1998-04-16  0:00               ` David Kastrup
1998-04-16  0:00                 ` David Masterson
1998-04-17  0:00                   ` David Kastrup
1998-04-17  0:00               ` campo
1998-04-16  0:00             ` Tim Smith
1998-04-17  0:00               ` Thomas Bushnell, n/BSG
1998-04-18  0:00                 ` Bill Gribble
1998-04-20  0:00                   ` Ole-Hjalmar Kristensen
1998-04-21  0:00             ` William Tanksley
1998-04-14  0:00         ` Ada generics are bad Al Christians
1998-04-14  0:00         ` Robert Munck
1998-04-14  0:00           ` Matthew Heaney
1998-04-15  0:00           ` Jonathan Guthrie
replies disabled

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