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-Thread: 103376,e93f73587e2bc1c3 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!news.in2p3.fr!in2p3.fr!news.ecp.fr!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Sharing generic bodies across instantiations. Date: Mon, 2 Aug 2010 21:47:22 -0500 Organization: Jacob Sparre Andersen Message-ID: References: <4c4e2d69$0$2378$4d3efbfe@news.sover.net> <4c4f5c28$0$2375$4d3efbfe@news.sover.net> <7da1e21f-bec7-4607-923c-0fd6cbcfc753@t10g2000yqg.googlegroups.com> <1vjqnwxhvr91j.3e8ryvkk8ezv$.dlg@40tude.net> <1e77bsd66fduw.dbrgbk4g2ce7$.dlg@40tude.net> <22db743d-ef73-40fe-886d-9730a2763eaa@c10g2000yqi.googlegroups.com> <5cljc8pc0gv0$.115t79rxo29vs$.dlg@40tude.net> <9ad8b242-fe4c-4871-8c0e-1f1ddec936c7@w31g2000yqb.googlegroups.com> <94v29hel87y$.8jvqfyw964yt.dlg@40tude.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1280803644 16086 69.95.181.76 (3 Aug 2010 02:47:24 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Tue, 3 Aug 2010 02:47:24 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5843 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 X-RFC2646: Format=Flowed; Original Xref: g2news1.google.com comp.lang.ada:12817 Date: 2010-08-02T21:47:22-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:94v29hel87y$.8jvqfyw964yt.dlg@40tude.net... ... >> Can you elaborate on this, please? > > Compiled generic bodies, at least in Ada 83, can be parametrized using > linker expressions. I didn't looked into Ada 95 tagged types derived > within > the body from a formal generic parameter, you better as Randy for details. Deriving from a formal tagged type is illegal in generic bodies (always has been), see 3.9.1(4/2). This rule has less to do with generic sharing than with inheritance of abstract operations (Ada wants the bodies of instances to be always legal no matter what the actual parameters of the instance are). But it is convinient for generic sharing. (Derivation in the specification of a generic unit can be treated like an implicit formal parameter.) Randy.