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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,6e16e39504a85f4e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-03-01 21:36:00 PST Path: bga.com!news.sprintlink.net!uunet!newsgate.watson.ibm.com!watnews.watson.ibm.com!ncohen From: ncohen@watson.ibm.com (Norman H. Cohen) Newsgroups: comp.lang.ada Subject: Re: Borland Ada Date: 27 Feb 1995 16:55:51 GMT Organization: IBM T.J. Watson Research Center Distribution: world Message-ID: <3it06n$1hof@watnews1.watson.ibm.com> References: <3icuq6$1j3c@watnews1.watson.ibm.com> <3ioh3j$mn@lang8.cs.nyu.edu> Reply-To: ncohen@watson.ibm.com NNTP-Posting-Host: rios8.watson.ibm.com Date: 1995-02-27T16:55:51+00:00 List-Id: In article <3ioh3j$mn@lang8.cs.nyu.edu>, comar@cs.nyu.edu (Cyrille Comar) writes: |> ncohen@watson.ibm.com (Norman H. Cohen) writes: |> |> : Multiple inheritance and single inheritance are different ways of |> : DEFINING a class. Once the class is defined, an object of that class is |> : like an object of any other class: It has a unique tag; zero or more data |> ^^^^^^^^^^^^^^^^^ ... |> This is unfortunately not true, an objects coming from a class that |> multiple-inherits, contains more than one virtual table pointer (the |> equivalent of a tag), this is what makes the interfacing not |> completely trivial... In the C++ implementations with which I'm familiar, there is one vtable pointer corresponding to the object itself. The other vtable pointers correspond to the parent-class subobjects that are embedded in the derived-class object. These only come into play when converting a pointer to the derived class into a pointer to one of its base classes. In my note, I presumed that C++ classes imported into Ada would be treated, in effect, as root tagged types. That is, they have the operations they have, and the Ada programmer is oblivious to whether these operations were introduced in C++ with the imported class itself or inherited from some ancestor; the Ada programmer would have no way to get at the ancestor types. If this presumption is correct, objects of the imported class have only one tag that really matters, even if the imported class was defined by multiple inheritance. Was my presumption incorrect? -- Norman H. Cohen ncohen@watson.ibm.com