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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9747037d09060687 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!club-internet.fr!feedme-small.clubint.net!ecngs!feeder2.ecngs.de!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: A proposal for formal packages matching Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1b1brfydbng85$.106aaoguop29f.dlg@40tude.net> <24af3981-70bd-48fb-95e7-8acb2c2521de@40g2000prx.googlegroups.com> Date: Mon, 15 Dec 2008 20:21:54 +0100 Message-ID: NNTP-Posting-Date: 15 Dec 2008 20:21:57 CET NNTP-Posting-Host: 3d5216a1.newsspool3.arcor-online.net X-Trace: DXC=h7laWV4fIKCI7\_^6>c20JMcF=Q^Z^V3H4Fo<]lROoRA^YC2XCjHcbIk38cA]E6mcFDNcfSJ;bb[EIRnRBaCdc4[OS?T\0Kaoj\B X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:2998 Date: 2008-12-15T20:21:57+01:00 List-Id: 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