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-25 00:51:58 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.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 Date: Mon, 25 Feb 2002 08:51:57 GMT Message-ID: <3c79f60b.1053515@News.CIS.DFN.DE> References: <3c70b935.501062@News.CIS.DFN.DE> <3c721028.221281@News.CIS.DFN.DE> <3C748B15.7080005@mail.com> <3c74b2a0.415796@News.CIS.DFN.DE> <3C7539CC.4080907@mail.com> <3c7607f9.87807140@News.CIS.DFN.DE> <3C767902.2090908@mail.com> NNTP-Posting-Host: tar-alcarin.cbb-automation.de (212.79.194.111) X-Trace: fu-berlin.de 1014627117 6585376 212.79.194.111 (16 [77047]) X-Newsreader: Forte Free Agent 1.21/32.243 Xref: archiver1.google.com comp.lang.ada:20348 comp.object:35176 Date: 2002-02-25T08:51:57+00:00 List-Id: On Fri, 22 Feb 2002 11:59:46 -0500, Hyman Rosen wrote: >Dmitry A. Kazakov wrote: >> That's the whole point. Dispatching vs. not dispatching is not an >> implementation detail, but a part of the contract. It seems that we >> are using different definitions of dispatch, thus we'll never agree. > >Yes, it's part of the contract, and in C++ it always dispatches. >There is only one definition of dispatch that I'm aware of - when >a virtual method is called through a pointer to an object, the method >actually called is determined by the actual type of the object, not >the declared type of the pointer. Compare: the actual type is class wide [no matter pointers, reference, value], the parameter is dispatching. >In C++, it is this actual type which >changes as control progresses through the hierarchy of constructors >or destructors. > >> No. I said exactly the opposite: >> "The behaviour of B::~B is safe." > >Here is what you said in your original message: > C++ and Ada 95 support re-dispatching, > which I think is inherently unsafe Yes this is may point that re-dispatching is unsafe. Also my point is that destructors in C++ are safe because [in your terminology] they dispatche as if the actual type were the formal type. This behaviour is safe, because [according to my terminology] they do not dispatch at all. Which IMO should be always so in a specific subroutine [destructors cannot be class wide]. >> I definitely do not want that self-contradictory mixture > > of types and their closures as in C++. > >I don't even know what this means. C++ does not have >"self-contradictory" types. This means, I quote you : "... actual type which changes as control progresses through the hierarchy of constructors or destructors." If there is no distinction between specific and class wide types, then somersaults like morphing types are inevitable. One cannot mix sets and its elements without a punishment. Regards, Dmitry Kazakov