comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <jrcarter@acm.org>
Subject: Re: Need advice: Enumerate or not
Date: Thu, 16 May 2002 17:36:57 GMT
Date: 2002-05-16T17:36:57+00:00	[thread overview]
Message-ID: <3CE3EE2F.6889E67E@acm.org> (raw)
In-Reply-To: 5ee5b646.0205151837.5b773899@posting.google.com

Robert Dewar wrote:
> 
> Jeffrey Carter <jrcarter@acm.org> 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



      parent reply	other threads:[~2002-05-16 17:36 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
2002-05-16  2:37     ` Robert Dewar
2002-05-16 10:22       ` Preben Randhol
2002-05-16 17:36       ` Jeffrey Carter [this message]
replies disabled

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