home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c++:11561 comp.std.c++:960
- 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: <1992Jul26.014223.6153@uunet.uu.net!mole-end>
- Summary: On Bath-Buns
- Organization: :
- References: <1992Jul23.183041.147@uunet.uu.net!mole-end> <1992Jul24.141611.19647@cadsun.corp.mot.com>
- Date: Sun, 26 Jul 1992 01:42:23 GMT
- Lines: 53
-
- In article <1992Jul24.141611.19647@cadsun.corp.mot.com>, shang@corp.mot.com (David (Lujun) Shang) writes:
- > In article <1992Jul23.183041.147@uunet.uu.net!mole-end>
- > mat@uunet.uu.net!mole-end writes:
-
- > > But without virtualization (polymorphic behavior) derivation is effectively
- > > useless. There is no reason to code inheritance without providing for
- > > virtualization.
- > I disagree. The language Oberon ... has derivation without virtualization.
- > Can you say that the derivation is useless in Oberon, or the language
- > Oberon is useless since it adds only a useless thing to Module-2?
- > Derivation is introduced mainly for code reuse, not for polymorphism. ...
-
- The catch is that C++ DOES support both polymorphism and polymorphic
- conversions of pointers and references. Given that the language supports
- those conversions, to NOT make the proper things polymorphic is to invite
- type errors.
-
- > > Then the case which you mention is of no use unless and
- > > until it is provided with RTTI; ...
- > Even we suppose what you said was true, it is still against logic to get the
- > conclusion that only those polymorphic classes need RTTI:
-
- > if
- > Derivation requires RTTI, and
- > Derivation requires virtualization (otherwise it is useless)
- > then
- > Only virtualization requires RTTI
-
- How about this:
-
- Derivation is only useful when used properly with virtualization.
- Virtualization is only meaningful in the context of derivation.
- Only derivation can make use of RTTI.
- therefore
- RTTI is only useful in the presence of virtualization.
-
- ------------------------------------------------------------------------------
- 1) Every idea of mine, that cannot be expressed as a syllogism,
- is really ridiculous;
- 2) None of my ideas about Bath-buns are worth writing down;
- 3) No idea of mine, that fails to come true, can be expressed as
- a syllogism;
- 4) I never have any really ridiculous idea, that I do not at
- once refer to my solicitor;
- 5) My dreams are all about Bath-buns;
- 6) I never refer any idea of mine to my solicitor, unless it
- is worth writing down.
- --RAH/CRD _The Number of the Beast_
- --
- (This man's opinions are his own.)
- From mole-end Mark Terribile
-
- uunet!mole-end!mat, Somewhere in Matawan, NJ
-