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

  1. Xref: sparky comp.lang.c++:11561 comp.std.c++:960
  2. Newsgroups: comp.lang.c++,comp.std.c++
  3. Path: sparky!uunet!mole-end!mat
  4. From: mat@uunet.uu.net!mole-end
  5. Subject: Re: Language extensions for run-time type identification
  6. Message-ID: <1992Jul26.014223.6153@uunet.uu.net!mole-end>
  7. Summary: On Bath-Buns
  8. Organization: :
  9. References: <1992Jul23.183041.147@uunet.uu.net!mole-end> <1992Jul24.141611.19647@cadsun.corp.mot.com>
  10. Date: Sun, 26 Jul 1992 01:42:23 GMT
  11. Lines: 53
  12.  
  13. In article <1992Jul24.141611.19647@cadsun.corp.mot.com>, shang@corp.mot.com (David (Lujun) Shang) writes:
  14. > In article <1992Jul23.183041.147@uunet.uu.net!mole-end>  
  15. > mat@uunet.uu.net!mole-end writes:
  16.  
  17. > > But without virtualization (polymorphic behavior) derivation is effectively
  18. > > useless. There is no reason to code inheritance without providing for
  19. > > virtualization. 
  20. > I disagree. The language Oberon ... has derivation without virtualization.
  21. > Can you say that the  derivation is useless in Oberon, or the language
  22. > Oberon is useless since it adds only a useless thing to Module-2?
  23. > Derivation is introduced mainly for code reuse, not for polymorphism. ...
  24.  
  25. The catch is that C++ DOES support both polymorphism and polymorphic
  26. conversions of pointers and references.  Given that the language supports
  27. those conversions, to NOT make the proper things polymorphic is to invite
  28. type errors.
  29.  
  30. > > Then the case which you mention is of no use unless and
  31. > > until it is provided with RTTI; ...
  32. > Even we suppose what you said was true, it is still against logic to get the  
  33. > conclusion that only those polymorphic classes need RTTI:
  34.  
  35. > if
  36. >     Derivation requires RTTI, and
  37. >     Derivation requires virtualization (otherwise it is useless)
  38. > then
  39. >     Only virtualization requires RTTI
  40.  
  41. How about this:
  42.  
  43.     Derivation is only useful when used properly with virtualization.
  44.     Virtualization is only meaningful in the context of derivation.
  45.     Only derivation can make use of RTTI.
  46.   therefore
  47.     RTTI is only useful in the presence of virtualization.
  48.  
  49.  ------------------------------------------------------------------------------
  50.     1) Every idea of mine, that cannot be expressed as a syllogism,
  51.         is really ridiculous;
  52.     2) None of my ideas about Bath-buns are worth writing down;
  53.     3) No idea of mine, that fails to come true, can be expressed as
  54.         a syllogism;
  55.     4) I never have any really ridiculous idea, that I do not at
  56.         once refer to my solicitor;
  57.     5) My dreams are all about Bath-buns;
  58.     6) I never refer any idea of mine to my solicitor, unless it
  59.        is worth writing down.
  60.                     --RAH/CRD _The Number of the Beast_
  61. -- 
  62.  (This man's opinions are his own.)
  63.  From mole-end                Mark Terribile
  64.  
  65.  uunet!mole-end!mat, Somewhere in Matawan, NJ
  66.