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-15 17:31:23 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!news.gtei.net!newsfeed.mathworks.com!wn3feed!wn2feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!not-for-mail Message-ID: <3CE2FDDF.5050806@worldnet.att.net> From: Jim Rogers User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1 X-Accept-Language: en-us 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> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Thu, 16 May 2002 00:31:23 GMT NNTP-Posting-Host: 12.75.144.147 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1021509083 12.75.144.147 (Thu, 16 May 2002 00:31:23 GMT) NNTP-Posting-Date: Thu, 16 May 2002 00:31:23 GMT Organization: AT&T Worldnet Xref: archiver1.google.com comp.lang.ada:24138 Date: 2002-05-16T00:31:23+00:00 List-Id: Jeffrey Carter wrote: > To summarize, enumeration types are easier to read but require writing > more code. Dispatching (OOP) is harder to read but requires less coding. > > 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. > That is a little unfair. I did not say that dispatching is contrary to the spirit of Ada. I did say it was not a typical Ada 83 design pattern. One goal of Ada is readability. Another is efficient maintenance. Those two goals are not always harmonious with each other. Dispatching can simplify maintenance by limiting the dependencies between packages compared to those encountered using explicit enumeration and case statements. This lowers the costs of compilation, testing and release (all valid parts of software maintenance). As with other features of Ada, or any other language, you need to find a balance between extreme positions in your design. Avoiding all dispatching MAY be correct for one set of requirements, while inappropriate for another set of requirements. We are fortunate that Ada allows us to make the appropriate engineering decisions. Some languages do not allow these engineering decisions. Jim Rogers