Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!hplabs!hpda!hpcupt1!thomasw From: thomasw@hpcupt1.cup.hp.com (Thomas Wang) Newsgroups: comp.lang.c++ Subject: Re: Re: About Lists and things... Message-ID: <68070005@hpcupt1.cup.hp.com> Date: 29 Jun 91 01:22:51 GMT References: <2865E7A8.179A@tct.com> Organization: Hewlett Packard, Cupertino Lines: 24 > If you need a Circle interface, design your software so that you always put > your Circle onto a CircleList. Only put your Circles onto ShapeLists when > you're dealing with Shapes. This restriction may be acceptable to a large class of programmers, but I still see it as a significant restriction. It is best when a description of the physical world problem can be translated directly into object oriented pseudo code. Consider how real world containers work: If I put cookies into a box that can contain everything, I still know there are cookies inside the box. They do not suddenly become generic objects. Their type information is not lost. > I agree with Chip 300%. It's a trade off between type safety, and information loss. -steve > | Steve Vinoski (508)256-0176 x5904 | Internet: vinoski@apollo.hp.com -Thomas Wang wang@hpdmsjlm.cup.hp.com (Everything is an object.) thomasw@hpcupt1.cup.hp.com