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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM 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!postnews.google.com!g44g2000cwa.googlegroups.com!not-for-mail From: "Hyman Rosen" Newsgroups: comp.lang.ada Subject: Re: tagged record child: override constructor? Date: 14 Sep 2005 13:56:11 -0700 Organization: http://groups.google.com Message-ID: <1126731371.081850.90860@g44g2000cwa.googlegroups.com> 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> NNTP-Posting-Host: 204.253.248.208 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1126731376 20518 127.0.0.1 (14 Sep 2005 20:56:16 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 14 Sep 2005 20:56:16 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.10) Gecko/20050716 (No IDN) Firefox/1.0.6,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: g44g2000cwa.googlegroups.com; posting-host=204.253.248.208; posting-account=lJDDWg0AAACmMd7wLM4osx8JUCDw_C_j Xref: g2news1.google.com comp.lang.ada:4677 Date: 2005-09-14T13:56:11-07:00 List-Id: 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. 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. > 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() and that dispatches to B::f(). The A::g() that's called by B::B() is exactly the same A::g() that's called from outside constructors.