home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c++:12337 comp.std.c++:1082
- Path: sparky!uunet!sun-barr!olivea!mintaka.lcs.mit.edu!ai-lab!life.ai.mit.edu!tmb
- From: tmb@arolla.idiap.ch (Thomas M. Breuel)
- Newsgroups: comp.lang.c++,comp.std.c++
- Subject: Re: Language extensions for run-time type identification
- Message-ID: <TMB.92Aug14125447@arolla.idiap.ch>
- Date: 14 Aug 92 16:54:47 GMT
- References: <1992Jul23.183041.147@uunet.uu.net!mole-end>
- <1992Jul24.141611.19647@cadsun.corp.mot.com>
- <1992Jul26.014223.6153@uunet.uu.net!mole-end>
- Sender: news@ai.mit.edu
- Reply-To: tmb@idiap.ch
- Followup-To: comp.lang.c++
- Organization: IDIAP (Institut Dalle Molle d'Intelligence Artificielle
- Perceptive)
- Lines: 34
- In-reply-to: mat@uunet.uu.net!mole-end's message of 26 Jul 92 01:42:23 GMT
-
- In article <1992Jul26.014223.6153@uunet.uu.net!mole-end> mat@uunet.uu.net!mole-end writes:
-
- How about this:
-
- [1] Derivation is only useful when used properly with virtualization.
- [2] Virtualization is only meaningful in the context of derivation.
- [3] Only derivation can make use of RTTI.
- therefore
- RTTI is only useful in the presence of virtualization.
-
- All your premises are wrong.
-
- (1) To the limited extent that derivation is useful at all,
- derivation is useful for reuse of functionality even in the
- absence of virtual functions. I use derivation in C++ more
- frequently than virtual functions. Other languages (Oberon,
- CommonLisp DEFSTRUCT, SML) offer derivation without
- virtualization.
-
- (2) It does make sense to "virtualize" without derivation: you get
- something similar to overloading in C++, except that the
- "overloading" is resolved at runtime. There needs to be no
- inheritance relationship among the types participating in this.
- Among others, CLOS lets you do this.
-
- (3) Users of Lisp and similar languages have made use of RTTI since
- before derivation even became a concept in programming languages.
-
- The limitations C++ has in all these areas are consequences of
- its heritage and the desire to have low-overhead implementations. But
- please let us not re-define reality to fit the special circumstances
- of the C++ programming language.
-
- Thomas.
-