home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c++:11337 comp.std.c++:916
- Path: sparky!uunet!igor!thor!rmartin
- From: rmartin@thor.Rational.COM (Bob Martin)
- Newsgroups: comp.lang.c++,comp.std.c++
- Subject: Re: Language extensions for run-time type identification
- Message-ID: <rmartin.711829160@thor>
- Date: 22 Jul 92 18:19:20 GMT
- References: <14ft2uINNjh4@agate.berkeley.edu> <1992Jul21.143131.6902@cadsun.corp.mot.com>
- Sender: news@Rational.COM
- Followup-To: comp.lang.c++
- Lines: 21
-
- shang@corp.mot.com (David (Lujun) Shang) writes:
-
- |In article <14ft2uINNjh4@agate.berkeley.edu> jbuck@forney.berkeley.edu (Joe
- |Buck) writes:
- |
- |> * the fact that it is trivial to force any class for which run-time type
- |> identification is needed to have a virtual function table (simply add
- |> a virtual destructor).
- |>
- |Adding something virtual just for the purpose that has nothing to do with it?
-
- 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...
-
-
- --
- +---Robert C. Martin---+-RRR---CCC-M-----M-| R.C.M. Consulting |
- | rmartin@rational.com |-R--R-C----M-M-M-M-| C++/C/Unix Engineering |
- | (Uncle Bob.) |-RRR--C----M--M--M-| OOA/OOD/OOP Training |
- +----------------------+-R--R--CCC-M-----M-| Product Design & Devel. |
-