Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!uunet!igor!rutabaga!jls From: jls@rutabaga.Rational.COM (Jim Showalter) Newsgroups: comp.object Subject: Re: Readability of Ada Message-ID: Date: 30 Apr 91 02:32:41 GMT References: <3878@ssc-bee.ssc-vax.UUCP> <20245@alice.att.com> <1991Apr23.193715.23815@odin.diku.dk> <913@puck.mrcu> Sender: news@Rational.COM Lines: 25 ]>The original problem was to iterate over a list of generic shapes and ]>print out the radii of those that had them. The way to do this is to ]>keep a separate list of objects with a radius and walk down that. You ]>do NOT start sticking in CASE statements on type tags. This merely pushes the problem down one level. I now ask: how does one OBTAIN the separate list of objects with a radius? ]>Later in the article the point was made that "all" languages except ]>C++ contain a way of finding out what type you are dealing with. I did not make this claim--how the hell should I know what all languages offer. I quite specifically said that C++ does not offer self-identifying types, but that Smalltalk, Eiffel, and CLOS do (to the best of my knowledge). ]>If you find yourself using type tags or some similar dodge, you have ]>done it wrong and are just storing up trouble. I agree in principle. But you still haven't shown me how to solve my example in C++ WITHOUT using tags of some kind--which is my point. -- * "Beyond 100,000 lines of code, you should probably be coding in Ada." * * - P.J. Plauger, Convener and Secretary of the ANSI C Committee * * * * The opinions expressed herein are my own. *