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,342dcd67e9ca73ee X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!newsread.com!newsprint.newsread.com!news-out2.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!newsfeed.freenet.de!newsfeed.arcor.de!news.arcor.de!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: tagged record child: override constructor? Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.14.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: <1126591134.797303.318920@z14g2000cwz.googlegroups.com> <1uri5gd2n7om0.1ujkzb26ayxdx.dlg@40tude.net> <1126625009.709876.226260@f14g2000cwb.googlegroups.com> <225337460.SlYKbeB8eD@linux1.krischik.com> <87vf14him5.fsf@ludovic-brenta.org> <1idpvzxcxfckw.mrs8nw3eu4ks$.dlg@40tude.net> <13wyu4lwsmzmz.ktc3t2av54yv$.dlg@40tude.net> <1126705974.984997.227590@z14g2000cwz.googlegroups.com> <1126718176.448703.193860@g44g2000cwa.googlegroups.com> <1aroipmwspnb8.zqxtxhb4t06u$.dlg@40tude.net> <1126731371.081850.90860@g44g2000cwa.googlegroups.com> Date: Thu, 15 Sep 2005 09:31:16 +0200 Message-ID: <12v93t1k4i81i$.sm5jmg8q3lpk$.dlg@40tude.net> NNTP-Posting-Date: 15 Sep 2005 09:31:07 MEST NNTP-Posting-Host: 9410eae7.newsread2.arcor-online.net X-Trace: DXC=cncAMNU:3Zj_Pi]:Sm<]\dQ5U85hF6f;djW\KbG]kaMhQ>n?D9BSA]lMe6jch?nKOaWRXZ37ga[7jn919Q4_`VjiB8=X\UUgbkd X-Complaints-To: abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:4681 Date: 2005-09-15T09:31:07+02:00 List-Id: On 14 Sep 2005 13:56:11 -0700, Hyman Rosen wrote: > Dmitry A. Kazakov wrote: >> There is no point in adopting what other languages did wrong. > > Except that Ada isn't doing things any differently than the > other languages, it's just adopted a notation that makes it > confusing. Ada *does* allow redispatch, type tags *are* in > every tagged object, you *can* convert from the type to the > classwide type, tagged objects are *always* passed by > reference. Ada's model is the *only* model I know which allows: 1. A universal-purpose language (like C++ or Ada) to become a pure OO language. 2. To support multiple dispatch 3. To avoid distributed overhead 4. To create a consistent construction/destruction model OK, these opportunities weren't used, so what? > But where C++ and Java will make dispatching > calls where those are indicated by the class specification, > Ada forces the programmer to request such calls in a strange > way at call sites, and since there's nothing syntactically > wrong with making a non-dispatching call, the programmer won't > notice the mistake if that request isn't made. Which mistake? Again, it is solely the actual object's *type* which determines dispatch. It is 100% safe, intuitive and unambiguous. Ada is a typed language! Is C++ one? >> As I said before, it is equivalent to dispatch that does not happen. > > You may say it all you like, but my code clearly demonstrates > that dispatching *does* happen. B::B() calls A::g() No. It calls B::g() which was inherited from A. I don't care if code of B::g() and A::g() share memory or not. They are different functions because their signatures are different. > and that dispatches to B::f(). It does not. It calls B::f() from B::g() -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de