home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c++:11462 comp.std.c++:937
- Newsgroups: comp.lang.c++,comp.std.c++
- Path: sparky!uunet!mole-end!mat
- From: mat@uunet.uu.net!mole-end
- Subject: Re: Language extensions for run-time type identification
- Message-ID: <1992Jul23.183041.147@uunet.uu.net!mole-end>
- Organization: :
- References: <1992Jul21.094204.20100@mole-end> <1992Jul22.150330.6160@cadsun.corp.mot.com>
- Date: Thu, 23 Jul 1992 18:30:41 GMT
- Lines: 28
-
- In article <1992Jul22.150330.6160@cadsun.corp.mot.com>, shang@corp.mot.com (David (Lujun) Shang) writes:
- > In article <1992Jul21.094204.20100@mole-end> mat@mole-end writes:
- > >
- > > The assumption underlying the decision to include only classes with
- > > virtual functions is that a class that has no polymorphic behavior
- > > whatsoever (not even a virtual destructor) cannot be used in any way
- > > that is both safe and interesting even with the proposed runtime type
- > > support. Can you refute this assumption?
- > > --
-
-
- > First of all and to be specific to C++, it is the class hierarchy, or
- > inheritance and the polymorphic pointers that lead to the necessity of
- > run time type checking. It is not the virtual behaviors of a class.
- > We still need run time type check even if we disallow any virtual behaviors
- > in C++. Therefore, the assumption is laid on the wrong ground.
-
- But without virtualization (polymorphic behavior) derivation is effectively
- useless. There is no reason to code inheritance without providing for
- virtualization. Then the case which you mention is of no use unless and
- until it is provided with RTTI; providing RTTI for it using reasonable
- and economical mechanisms would violate certain assumptions that C++ allows
- its users to make (C struct compatability).
- --
- (This man's opinions are his own.)
- From mole-end Mark Terribile
-
- uunet!mole-end!mat, Somewhere in Matawan, NJ
-