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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,103b407e8b68350b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-06 11:13:23 PST Path: archiver1.google.com!news2.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Anybody in US using ADA ? One silly idea.. Date: Mon, 6 Jan 2003 13:07:44 -0600 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: <3E147D79.2070703@cogeco.ca> <4519e058.0301031434.51a0c880@posting.google.com> X-Newsreader: Microsoft Outlook Express 4.72.3612.1700 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3719.2500 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.lang.ada:32633 Date: 2003-01-06T13:07:44-06:00 List-Id: Dmitry A. Kazakov wrote in message ... >>> 1.a. This kills code reuse at run-time. >> >> This is therefore not necessarily true, based on the above. > >No, you cannot reuse code across instantiations. Each of them is a macro >expansion which has a separate body. Theoretically one could share generic >bodies [at least in Ada it is sometimes possible], but practically it is >not the case. Bull. You just need to use a different compiler. Ada /= GNAT! Janus/Ada 95 shares all generic bodies. That's probably too aggressive, but it's too expensive to change. Dan Eilers will tell you that their compiler (ICC) shares generic bodies (I believe unless pragma Inline is used on the generic). Many Ada 83 compilers shared generic bodies, include DEC and Rational. It's harder in Ada 95, but if there was any significant demand, compilers would have it. Randy Brukardt.