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,f428ff2031155951 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!xlned.com!feeder7.xlned.com!news2.euro.net!newsfeed.freenet.ag!news.netcologne.de!ramfeed1.netcologne.de!newsfeed.arcor.de!newsspool3.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="us-ascii" Content-Transfer-Encoding: 7bit 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> <1phnecgw6ckgv.1vm12emlufu5b.dlg@40tude.net> Date: Sat, 29 Jan 2011 09:47:04 +0100 Message-ID: <14jd18jvu7lv5$.fbnn6azbxr7e$.dlg@40tude.net> NNTP-Posting-Date: 29 Jan 2011 09:47:05 CET NNTP-Posting-Host: 3b6f326a.newsspool2.arcor-online.net X-Trace: DXC=3J6Em]9l@Q@X36K@\WTHGJA9EHlD;3YcB4Fo<]lROoRA8kFW_>A4kOfPH On Fri, 28 Jan 2011 18:12:20 -0600, Randy Brukardt wrote: > "Dmitry A. Kazakov" wrote in message > news:1phnecgw6ckgv.1vm12emlufu5b.dlg@40tude.net... > ... >> 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. > > I have no idea as to what you are talking about here. I mean that the issues, MI is customary accused of, are common and unavoidable with or without MI. > IMHO, MI is a > large cannon whose primary purpose is to blow off limbs. Nope, MI is an important software development tool for refactoring and reuse. My current project's size could be reduced in a third, if Ada had MI. > Remember that a lot more goes into what is overriding than just the names of > operations; it also depends on the profiles and visibility. But the core issue is always same: the choice between overloading vs. overriding. > And, regardless of whether there is a language design flaw, there is no > chance that this would change. It would break too much existing code. I don't think so, because the means to control the choice are just absent. Clearly there should be some syntax additions to specify the behavior. So far the only one is the keyword "overriding." Also there must be means to resolve unavoidable conflicts. Each overloaded item should have a unique name. Furthermore, the primitive operations should have names (presently the names of their type-specific instances are used in an ambiguous manner). > Moreover, I think that what you are talking about is actively harmful. Claw, > for instance, uses the current rules to have implementation operations that > are dispatching, but that clients cannot override in any circumstances. (If > they did, Claw would likely fall over in a heap, causing a debugging and > support nightmare.) I am talking about the reality, the reality hurts, I know (:-)). BTW, I am not proposing to change the current language behavior. I want new language means to be able to *describe* this behavior explicitly and same means to describe the alternative behavior where I wanted. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de