home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c++:11269 comp.std.c++:904
- Path: sparky!uunet!ogicse!decwrl!world!wmm
- From: wmm@world.std.com (William M Miller)
- Newsgroups: comp.lang.c++,comp.std.c++
- Subject: Re: Language extensions for run-time type identification
- Message-ID: <BrrAvo.EFA@world.std.com>
- Date: 21 Jul 92 20:42:59 GMT
- Article-I.D.: world.BrrAvo.EFA
- References: <TMB.92Jul20182052@arolla.idiap.ch> <1992Jul20.220534.1365@cadsun.corp.mot.com> <14ft2uINNjh4@agate.berkeley.edu>
- Organization: Software Emancipation Technology, Inc.
- Lines: 30
-
- In article <14ft2uINNjh4@agate.berkeley.edu>, Joe Buck writes:
- > * the virtual impossibility of designing a more general solution that does
- > not break compatibility with C structs (a requirement that may be
- > meaningless to theoretical folks but that is nevertheless vital).
- > This constraint forbids adding any data to the object of any kind.
-
- I presented such a solution in my position paper on runtime type
- information given in a technical session at the March, 1991 X3J16
- meeting. It is somewhat more costly in time and space than the vtable
- approach, so it would probably require as a practical matter that both
- mechanisms be implemented, fast for classes with virtual functions and
- slow(er) for other classes.
-
- The issue is whether complete generality is sufficient justification
- for complicating the implementation and adding some runtime expense
- (which would be present even in programs that did not use RTTI
- facilities, unless turned off by command line or #pragma). I assume
- from the fact that my suggestion was not adopted into the current
- proposals that the general consensus was that complete generality was
- not sufficient justification. I don't know how to evaluate the
- relative importance of these factors.
-
- > I could also argue the other way: for a debugger, it isn't enough to
- > identify all class objects. I also need to be able to identify the
- > types of any int, double, pointer, or reference variables.
-
- This also turns out not to be terribly difficult. Again, the issue is
- trading off utility versus cost.
-
- -- William M. Miller, wmm@world.std.com
-