home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / cplus / 11689 < prev    next >
Encoding:
Internet Message Format  |  1992-07-28  |  1.5 KB

  1. Xref: sparky comp.lang.c++:11689 comp.std.c++:979
  2. 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
  3. From: chased@rbbb.Eng.Sun.COM (David Chase)
  4. Newsgroups: comp.lang.c++,comp.std.c++
  5. Subject: Re: Language extensions for run-time type identification
  6. Date: 28 Jul 1992 17:57:47 GMT
  7. Organization: Sun Microsystems, Mt. View, Ca.
  8. Lines: 17
  9. Message-ID: <l7b2krINN10u@exodus.Eng.Sun.COM>
  10. References: <1992Jul24.070325.1597@uunet.uu.net!mole-end> <1992Jul27.180115.1889@pony.Ingres.COM>
  11. NNTP-Posting-Host: rbbb
  12. Summary: Definition != Implementation (and vice-versa, one hopes)
  13.  
  14. In article <1992Jul27.180115.1889@pony.Ingres.COM> bobm@Ingres.COM (Bob McQueer) writes:
  15. >... when I want to know at run time if
  16. >an object is of a particular class, what I really want to ask is "is it this
  17. >class, or any class derived from it?", which implies somebody taking the
  18. >vtable (enhanced into class descriptor) pointer in the object instantiation,
  19. >and ascending through its parents.  With multiple inheritance, there can be
  20. >several flavors of this question.
  21.  
  22. Do be careful not to confuse the desired meaning of "X is a Foo" with
  23. how it is actually implemented.  For single inheritance, the best
  24. implementation is probably not what you think it is.  For multiple
  25. inheritance, I'm not sure what the best answer is, but I can certainly
  26. imagine a sparse representation of the (bit) matrix encoding the
  27. relation "T1 is a T2".
  28.  
  29. David Chase
  30. Sun
  31.