From: "Markus Schöpflin" <no.spam@spam.spam>
Subject: Re: Declaring private packages to instantiate generics?
Date: Mon, 21 May 2012 10:06:29 +0200
Date: 2012-05-21T10:06:29+02:00 [thread overview]
Message-ID: <jpct23$au9$2@speranza.aioe.org> (raw)
In-Reply-To: 7294223.88.1337225822800.JavaMail.geo-discussion-forums@vbli11
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.
next prev parent reply other threads:[~2012-05-21 8:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-16 14:21 Declaring private packages to instantiate generics? Markus Schöpflin
2012-05-16 14:36 ` Adam Beneschan
2012-05-16 14:45 ` Markus Schöpflin
2012-05-17 1:24 ` Shark8
2012-05-17 3:37 ` Adam Beneschan
2012-05-21 8:06 ` Markus Schöpflin [this message]
2012-05-21 15:51 ` Simon Wright
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox