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: 1108a1,7a180be12347b9d3 X-Google-Attributes: gid1108a1,public X-Google-Thread: 103376,7a180be12347b9d3 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-13 00:29:12 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!tar-alcarin.cbb-automation.DE!not-for-mail From: dmitry@elros.cbb-automation.de (Dmitry A. Kazakov) Newsgroups: comp.lang.ada,comp.object Subject: Re: Merits of re-dispatching [LONG] Date: Wed, 13 Feb 2002 09:29:10 GMT Message-ID: <3c6a2fb2.66346125@News.CIS.DFN.DE> References: <3c62524f.93369796@News.CIS.DFN.DE> <1013094178.985786@master.nyc.kbcfp.com> <3c6392e8.2400843@News.CIS.DFN.DE> <1013192956.289787@master.nyc.kbcfp.com> <3c68ceeb.88774578@News.CIS.DFN.DE> <3C698B2E.9070104@mail.com> NNTP-Posting-Host: tar-alcarin.cbb-automation.de (212.79.194.111) X-Trace: fu-berlin.de 1013588951 48334629 212.79.194.111 (16 [77047]) X-Newsreader: Forte Free Agent 1.21/32.243 Xref: archiver1.google.com comp.lang.ada:19964 comp.object:34265 Date: 2002-02-13T09:29:10+00:00 List-Id: On Tue, 12 Feb 2002 16:37:50 -0500, Hyman Rosen wrote: >Dmitry A. Kazakov wrote: >> That is one of several possible interpretation of what happens in C++ >> using Ada terms. However, I prefer mine, because it is consistent with >> the fact that the type tag [= vtab] is constant, thus the actual >> specific type is also constant. Like in Ada it is only a view >> conversion. > >It is not "one of several possible interpretation", it is what actually >happens in C++! For implementations which use vtables, the compiler >generates code to change the vtable pointer of the object as it runs >through its chains of destructors. (Presumably the compiler may detect >cases where it doesn't need to do this, but this is what happens in >principle.) Does the C++ standard require this? I do not know, but if yes, then C++ is even "better" than I used to think. (:-)) I remember one C run-time library implementation, which had printf modifying the format string and restoring it before return. It was a GREAT idea. Unfortunately, the compiler allocated string literals in the read-only memory. (:-)) Regards, Dmitry Kazakov