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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,436e4ce138981b82 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-03-09 00:41:19 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!tar-meneldur.cbb-automation.DE!not-for-mail From: Dmitry A. Kazakov Newsgroups: comp.lang.ada Subject: Re: abstract sub programs overriding Date: Tue, 09 Mar 2004 09:51:54 +0100 Message-ID: References: <5f59677c.0403021101.4ac263d0@posting.google.com> <5f59677c.0403060718.3d6aa909@posting.google.com> <1078776213.376775@master.nyc.kbcfp.com> NNTP-Posting-Host: tar-meneldur.cbb-automation.de (212.79.194.119) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 1078821678 65879096 I 212.79.194.119 ([77047]) X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:6176 Date: 2004-03-09T09:51:54+01:00 List-Id: On Mon, 08 Mar 2004 15:03:20 -0500, Hyman Rosen wrote: >Adam Beneschan wrote: > > whenever you call a subprogram (either directly or via dispatching), > > that subprogram will be concrete (as opposed to C++, which I believe > > does not guarantee this). > >This can happen in C++ only during object constructors or destructors >which Ada does not have (at least not in the same sense). C++ does not >allow objects of abstract type to be created, but during the execution >of a constructor or destructor, the type of the object is the type of >the class whose *tor is running, and that may be an abstract class. Yes, this is because C++ OO model is inconsistent. Nothing may change the object type, otherwise artifacts will inevitable show this or that way. > It >is undefined behavior to make a dispatching call which resolves to an >abstract method. Most implementations make such a call execute a stub >function which prints an error message and aborts the program. -- Regards, Dmitry Kazakov www.dmitry-kazakov.de