home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.c++:11852 comp.std.c++:1006
- Path: sparky!uunet!snorkelwacker.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: run-time type checking, freezing, and thawing
- Message-ID: <TMB.92Jul31165814@arolla.idiap.ch>
- Date: 31 Jul 92 20:58:14 GMT
- References: <BryL9q.K5I@watcgl.waterloo.edu> <2A75837D.8B10@tct.com>
- <2TJ53BQ@netmbx.netmbx.de> <2A78457A.561C@tct.com>
- <FAM5HFE@netmbx.netmbx.de>
- 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: 26
- In-reply-to: jrobie@netmbx.netmbx.de's message of 31 Jul 92 12:49:56 GMT
-
- In article <FAM5HFE@netmbx.netmbx.de> jrobie@netmbx.netmbx.de (Jonathan Robie) writes:
-
- chip@tct.com (Chip Salzenberg) writes:
- >According to jrobie@netmbx.netmbx.de (Jonathan Robie):
- >>RTTI is needed to properly freeze a C++ object into a "dead array of
- >>bytes" ...
- >Virtual functions are sufficient for freezing.
-
- Somebody out there is not listening. When I say "necessary" I do not
- mean that it is impossible for an application programmer to write lots
- of code that I could use to do a task. I simply mean that this info is
- not out there unless the compiler or the application programmer supplies it.
-
- For many classes it is simply wrong to use structural type information
- for "freezing" (just as it is wrong in general to use structural type
- information for determining equality). At the very least, the
- implementor of a class should be able to specify whether and to whom
- structural type information about a class should be accessible.
-
- Note also that you do not need runtime typing to make structural I/O
- work. You could provide generic structural I/O that requires knowledge
- of the object's type at compile time and does not have to rely on
- runtime type tags (as opposed to polymorphic structural I/O that
- requires RTTI).
-
- Thomas.
-