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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham 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!news-xfer.newsread.com!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!bandi.nntp.kabelfoon.nl!newsfeed.freenet.de!solnet.ch!solnet.ch!news-zh.switch.ch!switch.ch!cern.ch!news From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Re: tagged record child: override constructor? Date: Thu, 15 Sep 2005 15:45:46 +0200 Organization: CERN - European Laboratory for Particle Physics Message-ID: 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> <12v93t1k4i81i$.sm5jmg8q3lpk$.dlg@40tude.net> <1126790380.573573.78220@g44g2000cwa.googlegroups.com> NNTP-Posting-Host: abpc10883.cern.ch Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sunnews.cern.ch 1126791945 16792 (None) 137.138.37.241 X-Complaints-To: news@sunnews.cern.ch User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050913 Red Hat/1.7.10-1.4.2.SL3 X-Accept-Language: en-us, en In-Reply-To: <1126790380.573573.78220@g44g2000cwa.googlegroups.com> Xref: g2news1.google.com comp.lang.ada:4712 Date: 2005-09-15T15:45:46+02:00 List-Id: Hyman Rosen wrote: >>It is 100% safe, intuitive and unambiguous. > > It is not intuitive at all, except to people whose intuition has > been warped. It's just plain wrong. I agree with this. It can be instructive to see how it is done in other languages which claim to support OO. Any examples supporting the "Ada way"? If there are not many, then claiming that the whole world got it wrong whereas Ada got it right does not help, especially those who are learning or evaluating languages. For me it is clear in C++ that whenever I call a function which is virtual I should expect dynamic dispatch if the call is made through the pointer or reference to the base class. If I want to suppress this behaviour, I still can (obj.Base::fun()), which means that the element of control is there and I can take advantage of it when it is what is really needed. It is the question of what is the default that we get implicitly. For me, the default in C++ is correct, because it is consistent with what I understand by dynamic polymorphism. Note also that in C++ there is something like slicing, which actually "deprives" the object from its inherited properties, but people early learn to avoid it - for a reason. -- Maciej Sobczak : http://www.msobczak.com/ Programming : http://www.msobczak.com/prog/