comp.lang.ada
 help / color / mirror / Atom feed
From: Jim Rogers <jimmaureenrogers@worldnet.att.net>
Subject: Re: Need advice: Enumerate or not
Date: Thu, 16 May 2002 00:31:23 GMT
Date: 2002-05-16T00:31:23+00:00	[thread overview]
Message-ID: <3CE2FDDF.5050806@worldnet.att.net> (raw)
In-Reply-To: 3CE2A23D.850BA244@acm.org

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






  reply	other threads:[~2002-05-16  0:31 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-15  9:42 Need advice: Enumerate or not Preben Randhol
2002-05-15 12:26 ` Jim Rogers
2002-05-15 14:24   ` Preben Randhol
2002-05-16 13:03     ` Stephen Leake
2002-05-16 19:05       ` Preben Randhol
2002-05-15 18:00   ` Jeffrey Carter
2002-05-16  0:31     ` Jim Rogers [this message]
2002-05-16  2:37     ` Robert Dewar
2002-05-16 10:22       ` Preben Randhol
2002-05-16 17:36       ` Jeffrey Carter
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox