From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: A proposal for formal packages matching
Date: Mon, 15 Dec 2008 20:21:54 +0100
Date: 2008-12-15T20:21:57+01:00 [thread overview]
Message-ID: <mi2cpderwk11.1etvogpw261yn$.dlg@40tude.net> (raw)
In-Reply-To: 24af3981-70bd-48fb-95e7-8acb2c2521de@40g2000prx.googlegroups.com
On Mon, 15 Dec 2008 07:43:47 -0800 (PST), Ludovic Brenta wrote:
> The child's body sees its parent's private part but what does that
> have to do with the generic? The generic only needs visibility into
> the parent's public part.
I cannot comment on this. It is not about what a generic child needs. It is
about matching formal packages.
> Assuming the language allowed you to pass a
> child as the actual for a formal that requires a parent, what would
> this buy you?
Simplicity, no need to search for a parent. I don't see any obvious reason
why an instance of a child should not match its formal parent.
> If you see the child (AB) you can also see its parent
> (A) so I can't think of a case where passing the parent as the actual
> is a problem.
The parent can be a formal parameter of a formal parameter of a generic
package that instantiates the child in its declaration part. There existed
problems such constructs before. I cannot tell whether they were Ada 95 or
GNAT problems, and whether one cannot run into similar issues in Ada 2005.
--
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
next prev parent reply other threads:[~2008-12-15 19:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-15 10:21 A proposal for formal packages matching Dmitry A. Kazakov
2008-12-15 12:13 ` Ludovic Brenta
2008-12-15 13:29 ` Dmitry A. Kazakov
2008-12-15 15:43 ` Ludovic Brenta
2008-12-15 19:21 ` Dmitry A. Kazakov [this message]
2008-12-16 2:09 ` Randy Brukardt
2008-12-16 8:34 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox