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.4 required=5.0 tests=BAYES_00,FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,eeb3ea7993143012 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.211.103 with SMTP id nb7mr6662526pbc.6.1337587658968; Mon, 21 May 2012 01:07:38 -0700 (PDT) Path: pr3ni18833pbb.0!nntp.google.com!news1.google.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: =?ISO-8859-1?Q?Markus_Sch=F6pflin?= Newsgroups: comp.lang.ada Subject: Re: Declaring private packages to instantiate generics? Date: Mon, 21 May 2012 10:06:29 +0200 Organization: Aioe.org NNTP Server Message-ID: References: <25586653.906.1337178987063.JavaMail.geo-discussion-forums@pbcvy1> <7294223.88.1337225822800.JavaMail.geo-discussion-forums@vbli11> NNTP-Posting-Host: MdpKeRr+sx3LK7JQiK5aNw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Date: 2012-05-21T10:06:29+02:00 List-Id: Am 17.05.2012 05:37, schrieb Adam Beneschan: > On Wednesday, May 16, 2012 7:36:27 AM UTC-7, Adam Beneschan wrote: [...] > I just got reminded by Tucker Taft that there's a problem if P has > parameters. The parameters aren't listed in a generic_instantiation: > > package FOO is procedure P (Param : in Integer; Param2 : out Integer); end > FOO; > > package body FOO is package BAR is new SOME_GENERIC_PACKAGE; procedure P is > new BAR.P; end FOO; > > This makes it less clear to the eye that the second P completes the first > one. (This would especially be a problem if there is more than one P with > different parameter profiles in the specification.) This makes it > clearer: > > package FOO is procedure P (Param : in Integer; Param2 : out Integer); end > FOO; > > package body FOO is package BAR is new SOME_GENERIC_PACKAGE; procedure > New_P is new BAR.P; procedure P (Param : in Integer; Param2 : out Integer) > renames New_P; end FOO; > > So there's a good reason why the rules are the way they are. You're right, thanks for the follow-up. And it's even the case in my case, I have a whole bunch of Ps which are implemented as instantiations of the same procedure. Markus PS: Sorry for rewrapping your part of the mail but my NNTP server started to complain about lines longer than 79 characters when posting.