home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / cplus / 11852 < prev    next >
Encoding:
Internet Message Format  |  1992-07-31  |  2.0 KB

  1. Xref: sparky comp.lang.c++:11852 comp.std.c++:1006
  2. Path: sparky!uunet!snorkelwacker.mit.edu!ai-lab!life.ai.mit.edu!tmb
  3. From: tmb@arolla.idiap.ch (Thomas M. Breuel)
  4. Newsgroups: comp.lang.c++,comp.std.c++
  5. Subject: Re: run-time type checking, freezing, and thawing
  6. Message-ID: <TMB.92Jul31165814@arolla.idiap.ch>
  7. Date: 31 Jul 92 20:58:14 GMT
  8. References: <BryL9q.K5I@watcgl.waterloo.edu> <2A75837D.8B10@tct.com>
  9.     <2TJ53BQ@netmbx.netmbx.de> <2A78457A.561C@tct.com>
  10.     <FAM5HFE@netmbx.netmbx.de>
  11. Sender: news@ai.mit.edu
  12. Reply-To: tmb@idiap.ch
  13. Followup-To: comp.lang.c++
  14. Organization: IDIAP (Institut Dalle Molle d'Intelligence Artificielle
  15.     Perceptive)
  16. Lines: 26
  17. In-reply-to: jrobie@netmbx.netmbx.de's message of 31 Jul 92 12:49:56 GMT
  18.  
  19. In article <FAM5HFE@netmbx.netmbx.de> jrobie@netmbx.netmbx.de (Jonathan Robie) writes:
  20.  
  21.    chip@tct.com (Chip Salzenberg) writes:
  22.    >According to jrobie@netmbx.netmbx.de (Jonathan Robie):
  23.    >>RTTI is needed to properly freeze a C++ object into a "dead array of
  24.    >>bytes" ...
  25.    >Virtual functions are sufficient for freezing.
  26.  
  27.    Somebody out there is not listening.  When I say "necessary" I do not
  28.    mean that it is impossible for an application programmer to write lots
  29.    of code that I could use to do a task.  I simply mean that this info is
  30.    not out there unless the compiler or the application programmer supplies it.
  31.  
  32. For many classes it is simply wrong to use structural type information
  33. for "freezing" (just as it is wrong in general to use structural type
  34. information for determining equality). At the very least, the
  35. implementor of a class should be able to specify whether and to whom
  36. structural type information about a class should be accessible.
  37.  
  38. Note also that you do not need runtime typing to make structural I/O
  39. work. You could provide generic structural I/O that requires knowledge
  40. of the object's type at compile time and does not have to rely on
  41. runtime type tags (as opposed to polymorphic structural I/O that
  42. requires RTTI).
  43.  
  44.                     Thomas.
  45.