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

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!microsoft!hexnut!jimad
  3. From: jimad@microsoft.com (Jim Adcock)
  4. Subject: Re: Language extensions for run-time type identification
  5. Message-ID: <1992Jul23.175944.9090@microsoft.com>
  6. Date: 23 Jul 92 17:59:44 GMT
  7. Organization: Microsoft Corporation
  8. References: <1992Jul21.143131.6902@cadsun.corp.mot.com> <rmartin.711829160@thor> <23284@alice.att.com>
  9. Lines: 22
  10.  
  11. In article <23284@alice.att.com> ark@alice.UUCP () writes:
  12. >In article <rmartin.711829160@thor> rmartin@thor.Rational.COM (Bob Martin) writes:
  13. |
  14. |> Posh!  Every class should have a virtual destructor.  It is insane not
  15. |> to declare the destructor virtual.  There is only one, small,
  16. |> exception to this rule, which has to do with structs placed in ROM...
  17. |
  18. |How about classes associated with small objects, such as Complex and Point?
  19.  
  20. Exactly!  How ABOUT them?
  21.  
  22. They OUGHT to be ROMABLE.  They OUGHT to be guaranteed to be const.
  23. A programmer writing:
  24.  
  25. const complex imag_pi(0, pi);
  26.  
  27. OUGHT to be able to assume that his/her constant IS constant, and generates
  28. the quality of code expected of constants.
  29.  
  30. BUT, none of this is true given the committee's decision to support
  31. "Humpty Dumpty" const.
  32.  
  33.