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,7a180be12347b9d3 X-Google-Attributes: gid103376,public X-Google-Thread: 1108a1,7a180be12347b9d3 X-Google-Attributes: gid1108a1,public X-Google-ArrivalTime: 2002-02-08 10:09:29 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!195.238.2.15!skynet.be!skynet.be!newspeer.radix.net!uunet!ash.uu.net!spool0900.news.uu.net!reader0901.news.uu.net!not-for-mail From: "Hyman Rosen" Newsgroups: comp.lang.ada,comp.object References: <3c62524f.93369796@News.CIS.DFN.DE> Subject: Re: Merits of re-dispatching [LONG] Date: Fri, 8 Feb 2002 13:10:15 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Organization: KBC Financial Products Message-ID: <1013191766.895310@master.nyc.kbcfp.com> Cache-Post-Path: master.nyc.kbcfp.com!unknown@mosquito.nyc.kbcfp.com X-Cache: nntpcache 2.3.3 (see http://www.nntpcache.org/) NNTP-Posting-Host: 204.253.250.10 X-Trace: 1013191783 reader1.ash.ops.us.uu.net 5916 204.253.250.10 Xref: archiver1.google.com comp.lang.ada:19788 comp.object:33693 Date: 2002-02-08T13:10:15-05:00 List-Id: "Matthew Heaney" wrote in message news:u668rmhvhdub11@corp.supernews.com... > Yes, but in Ada95, operations are static by default. You have to take > active steps in order to force the dispatching to occur. So the scenario > you describe cannot happen accidently. > > This is not the case in C++, where virtual member functions called through a > reference or pointer automatically dispatch. So yes you can very easily > have the problem you cite in C++. (Which is why many C++ books point out > this feature of the language.) I don't understand the argument you are making. The problem seems to me that when you make a dispatching call in the destructor (automatically in C++ or by request in Ada), C++ will take you to a safe function, whereas Ada will take you to a function which can manipulate already finalized submembers.