comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Equivalent of dynamic_cast (downcast) for tagged types
Date: Fri, 28 Jan 2011 18:21:12 +0100
Date: 2011-01-28T18:21:12+01:00	[thread overview]
Message-ID: <1phnecgw6ckgv.1vm12emlufu5b.dlg@40tude.net> (raw)
In-Reply-To: 242e5c66-04cf-46a0-ae33-5f4d70946b51@l22g2000pre.googlegroups.com

On Fri, 28 Jan 2011 08:44:08 -0800 (PST), Adam Beneschan wrote:

> On Jan 28, 1:16�am, "Dmitry A. Kazakov" <mail...@dmitry-kazakov.de>
> 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



  reply	other threads:[~2011-01-28 17:21 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-27 15:46 Equivalent of dynamic_cast (downcast) for tagged types Maciej Sobczak
2011-01-27 16:18 ` Dmitry A. Kazakov
2011-01-27 17:10   ` J-P. Rosen
2011-01-27 17:35     ` Dmitry A. Kazakov
2011-01-27 22:49     ` Maciej Sobczak
2011-01-27 17:50   ` Georg Bauhaus
2011-01-27 22:35   ` Maciej Sobczak
2011-01-28  5:07     ` Yannick Duchêne (Hibou57)
2011-01-28  9:16     ` Dmitry A. Kazakov
2011-01-28 13:11       ` AdaMagica
2011-01-28 14:13         ` Dmitry A. Kazakov
2011-01-28 23:51           ` Randy Brukardt
2011-01-29  0:55             ` Adam Beneschan
2011-01-28 16:44       ` Adam Beneschan
2011-01-28 17:21         ` Dmitry A. Kazakov [this message]
2011-01-29  0:12           ` Randy Brukardt
2011-01-29  8:47             ` Dmitry A. Kazakov
2011-01-28 17:33         ` Adam Beneschan
2011-01-28 15:13     ` Maciej Sobczak
2011-01-28 17:47       ` Robert A Duff
2011-01-28 22:04         ` Maciej Sobczak
2011-01-30 20:22           ` Stephen Leake
2011-01-31  9:04             ` AdaCore, user community and communication channels Maciej Sobczak
2011-01-31 10:42               ` Georg Bauhaus
2011-01-27 19:33 ` Equivalent of dynamic_cast (downcast) for tagged types Adam Beneschan
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox