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: a07f3367d7,f428ff2031155951 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!194.25.134.126.MISMATCH!newsfeed01.sul.t-online.de!t-online.de!news.belwue.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Equivalent of dynamic_cast (downcast) for tagged types Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <375fb596-ab12-4cb0-a190-53d62b94b2e4@e9g2000vbi.googlegroups.com> <510d779c-d15b-4fc1-b831-bfc578ecdb4b@z3g2000prz.googlegroups.com> <7q5flc9of9ey.19h9nmmzjxqn0.dlg@40tude.net> <242e5c66-04cf-46a0-ae33-5f4d70946b51@l22g2000pre.googlegroups.com> Date: Fri, 28 Jan 2011 18:21:12 +0100 Message-ID: <1phnecgw6ckgv.1vm12emlufu5b.dlg@40tude.net> NNTP-Posting-Date: 28 Jan 2011 18:21:12 CET NNTP-Posting-Host: 95b879f0.newsspool2.arcor-online.net X-Trace: DXC=bO\EMoPe]k;^8FBo0_81f>A9EHlD;3Yc24Fo<]lROoR18kF[ On Fri, 28 Jan 2011 08:44:08 -0800 (PST), Adam Beneschan wrote: > On Jan 28, 1:16�am, "Dmitry A. Kazakov" > wrote: >> It must be overriding because Adjust is a primitive operation. > > Wrong. [information hiding rationale skipped] Yes, it is wrong (language design). The operation is primitive even if invisible in *some* contexts. It means that there might exist other contexts where two operations would conflict. Furthermore, Ada designers tried (and expectedly failed) to ensure that "multiple inheritance" always override. This goal is inconsistent with the information hiding principle, as you have just pointed out. Now, the can of worms is open and the worms are crawling far and wide. P.S. Some silly rules exist to alleviate the mess. Like the rule that an interface cannot be implemented privately. That does not help. Multiple inheritance issues must be addressed properly. There is no other way. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de