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