From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a04e500922557815 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-16 10:36:57 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!wn1feed!wn3feed!worldnet.att.net!207.217.77.102!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread1.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3CE3EE2F.6889E67E@acm.org> From: Jeffrey Carter X-Mailer: Mozilla 4.7 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Need advice: Enumerate or not References: <3CE2540C.1030404@worldnet.att.net> <3CE2A23D.850BA244@acm.org> <5ee5b646.0205151837.5b773899@posting.google.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Thu, 16 May 2002 17:36:57 GMT NNTP-Posting-Host: 63.184.106.211 X-Complaints-To: abuse@earthlink.net X-Trace: newsread1.prod.itd.earthlink.net 1021570617 63.184.106.211 (Thu, 16 May 2002 10:36:57 PDT) NNTP-Posting-Date: Thu, 16 May 2002 10:36:57 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:24216 Date: 2002-05-16T17:36:57+00:00 List-Id: Robert Dewar wrote: > > Jeffrey Carter wrote in message news:<3CE2A23D.850BA244@acm.org>... > > > To summarize, enumeration types are easier to read but require writing > > more code. Dispatching (OOP) is harder to read but requires less coding. > > Not by any means universally true, depends upon the situation > > > Ada has as an explicit design goal of emphasizing ease of reading over > > ease of writing. Thus Rogers' statements support the claim that > > dispatching is not in the spirit of Ada. > > If meant as a general statement, this is a very peculiar claim. > > The real rule in Ada is use the appropriate design to make the code as easy > as possible to read *and* maintain. Sometimes dynamic dispatching meets this > criterion, sometimes it fails. I'm always glad to stir up some controversy, even if I have to stretch things to get there. My statements quoted above were in the context of Rogers' original statements. However, it has been my experience and that of many others that there is a positive correlation between ease of reading and ease of modification. This is because the modifier must first understand the code before he may modify it. When the use of dispatching makes the code harder to read, as in the case in question, it is generally true that it also makes the code harder to modify. -- Jeff Carter "If you think you got a nasty taunting this time, you ain't heard nothing yet!" Monty Python and the Holy Grail