Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uunet!pdn!tscs!tct!chip From: chip@tct.com (Chip Salzenberg) Newsgroups: comp.lang.c++ Subject: Re: typesafe downward casting Message-ID: <27FA1EC4.511C@tct.com> Date: 3 Apr 91 18:28:20 GMT References: <1991Mar30.161252.26129@kodak.kodak.com> <18.UUL1.3#8618@softrue.UUCP> <1991Apr2.161809.16952@kodak.kodak.com> Organization: Teltronics/TCT, Sarasota, FL Lines: 14 According to cok@islsun.Kodak.COM (David Cok): >I would maintain ... that a good program generally has few casts and a >good programming language allows most programs to be written without casts. Indeed. And that is true of C++ today -- IF you are willing to avoid using Base* all over the place when Derived* is meant. (Template collections are a tremendous help.) In other words, the way to regain an object's lost static type is not to lose it in the first place. -- Chip Salzenberg , Brand X Industries Custodial, Refurbishing and Containment Service When You Never, Ever Want To See It Again [tm]