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