From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_05,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,88b676af04f3073d X-Google-Attributes: gid103376,public From: stt@houdini.camb.inmet.com (Tucker Taft) Subject: Re: Ada generics are bad Date: 1998/04/08 Message-ID: #1/1 X-Deja-AN: 342131115 Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.camb.inmet.com References: Organization: Intermetrics, Inc. Newsgroups: comp.lang.ada Date: 1998-04-08T00:00:00+00:00 List-Id: 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