Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!pdn!tscs!tct!chip From: chip@tct.com (Chip Salzenberg) Newsgroups: comp.lang.c++ Subject: Re: Casting downward Message-ID: <28468F0F.4444@tct.com> Date: 31 May 91 17:59:43 GMT References: <675518012.11@sunbrk.FidoNet> Organization: Teltronics/TCT, Sarasota, FL Lines: 17 According to Doug.Orleans@sunbrk.FidoNet.Org (Doug Orleans): >My problem was this: there is a class Object which lies at the root >of the heirarchy. One branch of the tree is the Container branch, >which has classes such as Container, Collection, and Array. This approach, with all (interesting) classes derived from Object, is sometimes called a "type tree". In my opinion, a type tree is a poor match for the C++ language. I avoid it. I take care in my C++ programming not to lose the static type of any object for which I will need that static type later on. Obviously, this means that I cannot use just one Array class, one Bag class, etc. It's better to be type-safe than to be convenient. -- Chip Salzenberg at Teltronics/TCT , perl -e 'sub do { print "extinct!\n"; } do do()'