home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c++:11689 comp.std.c++:979
- Path: sparky!uunet!cs.utexas.edu!sun-barr!west.West.Sun.COM!news2me.ebay.sun.com!exodus.Eng.Sun.COM!rbbb.Eng.Sun.COM!chased
- From: chased@rbbb.Eng.Sun.COM (David Chase)
- Newsgroups: comp.lang.c++,comp.std.c++
- Subject: Re: Language extensions for run-time type identification
- Date: 28 Jul 1992 17:57:47 GMT
- Organization: Sun Microsystems, Mt. View, Ca.
- Lines: 17
- Message-ID: <l7b2krINN10u@exodus.Eng.Sun.COM>
- References: <1992Jul24.070325.1597@uunet.uu.net!mole-end> <1992Jul27.180115.1889@pony.Ingres.COM>
- NNTP-Posting-Host: rbbb
- Summary: Definition != Implementation (and vice-versa, one hopes)
-
- In article <1992Jul27.180115.1889@pony.Ingres.COM> bobm@Ingres.COM (Bob McQueer) writes:
- >... when I want to know at run time if
- >an object is of a particular class, what I really want to ask is "is it this
- >class, or any class derived from it?", which implies somebody taking the
- >vtable (enhanced into class descriptor) pointer in the object instantiation,
- >and ascending through its parents. With multiple inheritance, there can be
- >several flavors of this question.
-
- Do be careful not to confuse the desired meaning of "X is a Foo" with
- how it is actually implemented. For single inheritance, the best
- implementation is probably not what you think it is. For multiple
- inheritance, I'm not sure what the best answer is, but I can certainly
- imagine a sparse representation of the (bit) matrix encoding the
- relation "T1 is a T2".
-
- David Chase
- Sun
-