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,56131a5c3acc678e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-12-09 07:55:37 PST Path: archiver1.google.com!news2.google.com!fu-berlin.de!uni-berlin.de!tar-atanamir.cbb-automation.DE!not-for-mail From: Dmitry A. Kazakov Newsgroups: comp.lang.ada Subject: Re: Question about OO programming in Ada Date: Tue, 09 Dec 2003 16:59:56 +0100 Message-ID: <7krbtv4bs50bm5gmdquteo3r0705ps58jt@4ax.com> References: <1070889942.156714@master.nyc.kbcfp.com> <5lcBb.4138$UM4.2773@nwrdny01.gnilink.net> <1070976556.767919@master.nyc.kbcfp.com> <1070982307.973327@master.nyc.kbcfp.com> NNTP-Posting-Host: tar-atanamir.cbb-automation.de (212.79.194.116) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 1070985335 75934143 212.79.194.116 ([77047]) X-Newsreader: Forte Agent 1.8/32.548 Xref: archiver1.google.com comp.lang.ada:3277 Date: 2003-12-09T16:59:56+01:00 List-Id: On Tue, 09 Dec 2003 10:05:07 -0500, Hyman Rosen wrote: >Dmitry A. Kazakov wrote: >> Again, implementation issue is irrelevant. It is a subroutine that is >> dispatching [in a parameter]. The object is not. The difference >> becomes especially clear, when you consider multiple dispatch. > >But the common OO languages don't support multiple dispatch, >and whether or not you regard implementation as irrelevant, >it is nevertheless the case that dispatching in those languages >is coordinated around the object type, not separately around each >dispatching function. So what? >> This is exaclty what I meant by claiming that it is not a class-wide >> pointer. A dispatching subroutine is defined on the whole class >> (=closure of the domains of all derived types). Each override >> represents a part of its body called according to the type tag. The >> behaviour in C++ constructors/destructors clearly violates this. So >> either the type is not class-wide or the subroutine is not >> dispatching. Choose what you want, the result is same. > >You either-or is a false dichotomy. As you say, "Each override >represents a part of its body called according to the type tag." >In C++, the type tag stored within the object changes as the code >progresses through constructors and destructors. If the type tag gets changed, then the type does as well. End of story. For an object of *same* type a dispatch to *same* method should yeld same target. It is not the case for C++. The target in constructor / destructor or their callee is same as if the method were not dispatching. So I claim again, if it "dispatches" as a type-specific call, then it is type specific. -- Regards, Dmitry Kazakov http://www.dmitry-kazakov.de