home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / lang / cplus / 18865 < prev    next >
Encoding:
Text File  |  1993-01-08  |  1.5 KB  |  36 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!darwin.sura.net!udel!rochester!rocksanne!news
  3. From: heliotis.ROCH803@xerox.com (Jim Heliotis)
  4. Subject: Re: "type safety" deemed essential
  5. Message-ID: <1993Jan8.204228.7174@spectrum.xerox.com>
  6. Sender: news@spectrum.xerox.com
  7. Reply-To: heliotis.ROCH803@xerox.com
  8. Organization: Xerox Corporation, Webster NY
  9. References: <TMB.93Jan6220042@arolla.idiap.ch>
  10. Date: Fri, 8 Jan 1993 20:42:28 GMT
  11. Lines: 23
  12.  
  13. In article 93Jan6220042@arolla.idiap.ch, tmb@arolla.idiap.ch (Thomas M. Breuel) writes:
  14.  
  15. >Unfortunately, C++ still lacks some kind of "tagged union type",
  16. >"typesafe union type", or, if you are a Pascal fan, a "variant record
  17. >with runtime type checking". Those kinds of datatypes are useful in
  18. >many applications. A common example is that of a binary tree with
  19. >different node and leaf types.
  20. >
  21. >:
  22. >:
  23.  
  24. That's exactly what subclasses (er, excuse me, derived classes) replace.
  25. I really think the need for variant records should be VERY rare now in
  26. C++, especially if they add RTTI, but it's even largely true without it.
  27.  
  28. ============================================================================
  29. Jim Heliotis                                       Voice Phone: 716-383-7410
  30. Xerox Corporation                                   FAX Phone:  716-383-7395
  31. 435 W. Commercial St.                                     Mail Stop: 803-01A
  32. East Rochester, NY 14445              Electronic Mail: JEH.ROCH803@Xerox.COM
  33. ============================================================================
  34.  
  35.  
  36.