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

  1. Xref: sparky comp.lang.c++:11337 comp.std.c++:916
  2. Path: sparky!uunet!igor!thor!rmartin
  3. From: rmartin@thor.Rational.COM (Bob Martin)
  4. Newsgroups: comp.lang.c++,comp.std.c++
  5. Subject: Re: Language extensions for run-time type identification
  6. Message-ID: <rmartin.711829160@thor>
  7. Date: 22 Jul 92 18:19:20 GMT
  8. References: <14ft2uINNjh4@agate.berkeley.edu> <1992Jul21.143131.6902@cadsun.corp.mot.com>
  9. Sender: news@Rational.COM
  10. Followup-To: comp.lang.c++
  11. Lines: 21
  12.  
  13. shang@corp.mot.com (David (Lujun) Shang) writes:
  14.  
  15. |In article <14ft2uINNjh4@agate.berkeley.edu> jbuck@forney.berkeley.edu (Joe  
  16. |Buck) writes:
  17. |> * the fact that it is trivial to force any class for which run-time type
  18. |>   identification is needed to have a virtual function table (simply add
  19. |>   a virtual destructor).
  20. |>
  21. |Adding something virtual just for the purpose that has nothing to do with it?
  22.  
  23. Posh!  Every class should have a virtual destructor.  It is insane not
  24. to declare the destructor virtual.  There is only one, small,
  25. exception to this rule, which has to do with structs placed in ROM...
  26.  
  27.  
  28. --
  29. +---Robert C. Martin---+-RRR---CCC-M-----M-| R.C.M. Consulting         |
  30. | rmartin@rational.com |-R--R-C----M-M-M-M-| C++/C/Unix Engineering    |
  31. |     (Uncle Bob.)     |-RRR--C----M--M--M-| OOA/OOD/OOP Training      |
  32. +----------------------+-R--R--CCC-M-----M-| Product Design & Devel.   |
  33.