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=1.4 required=5.0 tests=BAYES_50,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: cgreen@yosemite.atc.com (Christopher Green) Subject: Re: Ada generics are bad Date: 1998/04/10 Message-ID: <6gm6jc$fbp@newshub.atmnet.net>#1/1 X-Deja-AN: 342903720 References: Organization: Advanced Technology Center, Laguna Hills, CA Newsgroups: comp.lang.ada Date: 1998-04-10T00:00:00+00:00 List-Id: In article , Glenden Lee 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... > >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 Some compilers (Apex is one) have an option for "function form" generics. This allows the generic body to be compiled once and reused for each instance of the generic. Function form generics are often not quite as efficient in code speed (because they can't be inlined), and there are a few cases in which they can't be used at all. With "function form" generics, updating and recompiling the generic body does not obsolete units that instantiate it or depend on instantiations, and it is possible to deliver libraries that include only object code for such bodies (this is a key concern for developers of commercial Ada software such as ourselves, who are wary of releasing more source code than we absolutely have to). -- Chris Green Email cgreen@atc.com Advanced Technology Center Phone (714) 583-9119 22982 Mill Creek Drive ext. 220 Laguna Hills, CA 92653 Fax (714) 583-9213