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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,436e4ce138981b82 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-09 08:32:54 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newshosting.com!nx01.iad01.newshosting.com!news-feed01.roc.ny.frontiernet.net!nntp.frontiernet.net!uunet.MISMATCH!ash.uu.net!spool.news.uu.net!not-for-mail Date: Tue, 09 Mar 2004 11:32:40 -0500 From: Hyman Rosen User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: abstract sub programs overriding References: <5f59677c.0403060718.3d6aa909@posting.google.com> <1078776213.376775@master.nyc.kbcfp.com> <1078839257.157439@master.nyc.kbcfp.com> <5cmr40t76va200betf07b7bd6er05ltto9@4ax.com> <1078845298.702789@master.nyc.kbcfp.com> <0ipr40thtf86b520a0qdi003aj87gtuhd4@4ax.com> In-Reply-To: <0ipr40thtf86b520a0qdi003aj87gtuhd4@4ax.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Organization: KBC Financial Products Message-ID: <1078849973.701176@master.nyc.kbcfp.com> Cache-Post-Path: master.nyc.kbcfp.com!unknown@aphelion.nyc.kbcfp.com X-Cache: nntpcache 3.0.1 (see http://www.nntpcache.org/) NNTP-Posting-Host: 204.253.250.10 X-Trace: 1078849973 8527 204.253.250.10 Xref: archiver1.google.com comp.lang.ada:6193 Date: 2004-03-09T11:32:40-05:00 List-Id: Dmitry A. Kazakov wrote: > No. This is necessary only if the object is class-wide, i.e. when this > is treated as a class-wide pointer. Make it specific and the problem > will disappear. This is a vacuous statement. Yes, if you don't dispatch at all, then you don't have to decide where dispatching goes. If you want to make your own language where this is the case, go ahead, but C++, Java, and Ada all allow (re)dispatching. >>In C++ construction is neither monolithic nor required to be error-free, >>in the sense that any constructor may throw an exception to abort the >>creation of an object. > > ... with calling an abstract method as a consequence? No. In Java construction is not monolithic or exception-free either, but there dispatching always uses the most derived type. Calling an abstract method through dispatching from a *tor is a consequence of C++ preventing methods from running on unconstructed objects. As I keep saying, since such dispatching is easily detected, it's not a problem in practice. Erroneous code is caught at the point of error. > Dispatching on class-wides, which specific objects are not fully > constructed, is bogus. Nothing can heal it, even dispatching table > forgery cannot. And yet, unless you program in a language which prevents such dispatching from occurring, some decision must be made. None of C++, Java, nor Ada agree that such dispatching should be prohibited, so clearly your point of view is far from common.