home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / cplus / 11562 < prev    next >
Encoding:
Text File  |  1992-07-25  |  1.7 KB  |  40 lines

  1. Newsgroups: comp.lang.c++,comp.strd.c++
  2. Path: sparky!uunet!mole-end!mat
  3. From: mat@uunet.uu.net!mole-end
  4. Subject: Re: Language extensions for run-time type identification
  5. Message-ID: <1992Jul26.025147.6278@uunet.uu.net!mole-end>
  6. Organization: :
  7. References: <1992Jul24.070325.1597@uunet.uu.net!mole-end> <1992Jul24.145147.19761@cadsun.corp.mot.com>
  8. Date: Sun, 26 Jul 1992 02:51:47 GMT
  9. Lines: 29
  10.  
  11. In article <1992Jul24.145147.19761@cadsun.corp.mot.com>, shang@corp.mot.com (David (Lujun) Shang) writes:
  12. > In article <1992Jul24.070325.1597@uunet.uu.net!mole-end>  
  13.  
  14. > > And not to make you too happy: comparing vtable pointers could only be
  15. > > a first step unless you are absolutely sure that the compilation and
  16. > > linking system will never duplicate a vtable.  This is a hard assumption
  17. > > to prove, especially with dynamic linking of new types.
  18.  
  19. > The compiler and linker should essure that the vtable for a particular
  20. > class is unique. 
  21.  
  22. Yes, well, we may have to solve those problems to do templates well ...
  23. but for right now we are stuck with existing linkers.
  24.  
  25. > Anyway, after a sencond thought, I still insist on my original opinion, that  
  26. > is, it is not a good idea to use vtable pointer as the type-id.  Vtable
  27. > pointer is environment-dependent, it cannot serve as a type identifier
  28. > to communicate between two defferent environments.
  29.  
  30. Pointer comparison is an optimization; in a single memory space it's
  31. worth trying ... but you are right; deep equality comparison is needed.
  32. All the problems that arise (including source file identification for
  33. static types--and THAT includes directory structure) get worse when you
  34. do cross-environment stuff.
  35. -- 
  36.  (This man's opinions are his own.)
  37.  From mole-end                Mark Terribile
  38.  
  39.  uunet!mole-end!mat, Somewhere in Matawan, NJ
  40.