comp.lang.ada
 help / color / mirror / Atom feed
From: Georg Bauhaus <sb463ba@l1-hrz.uni-duisburg.de>
Subject: Re: enumeration type
Date: Mon, 27 Sep 2004 17:18:40 +0000 (UTC)
Date: 2004-09-27T17:18:40+00:00	[thread overview]
Message-ID: <cj9i1g$96q$1@a1-hrz.uni-duisburg.de> (raw)
In-Reply-To: nilv0l6grw08$.finhwgvz4fyr.dlg@40tude.net

Dmitry A. Kazakov <mailbox@dmitry-kazakov.de> wrote:

 [qualification]

: It is a valid point, but is not applicable for non-composite types.

From a technical point of view, yes, you needn't always qualify
literals, sure. From a stylistic point of view, a redundant
qualification might turn out to be a useful reminder, at least when
the near context isn't providing enough information.

Similarly, named parameters can be very helpful. Not only to provide
more information about the desired associations to the compiler,
but also to remind the reader which Insert parameter is the key,
and which is the value in an Integer -> Integer mapping.

Notice how the context for understanding the parameter associations
n this case is far away in the declaration of the library procedure
Insert.

Where is the threshold for "not enough context nearby"?
The psychologists seem to say that between 3 and 7 items
can be stacked by an average person. Would this be guidance
in determining when there are so many "programming constructs"
between two pieces of program text to that the second piece
should be qualified? 


-- Georg



      reply	other threads:[~2004-09-27 17:18 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-27  0:13 enumeration type Rick Santa-Cruz
2004-09-27  0:54 ` Jack Flynn
2004-09-27  1:26 ` Stephen Leake
2004-09-27  7:38 ` Dmitry A. Kazakov
2004-09-27 13:40   ` Larry Hazel
2004-09-27 14:09     ` Dmitry A. Kazakov
2004-09-27  9:45 ` Peter Hermann
2004-09-27 12:51   ` Georg Bauhaus
2004-09-27 13:43     ` Dmitry A. Kazakov
2004-09-27 14:19       ` Georg Bauhaus
2004-09-27 14:48         ` Dmitry A. Kazakov
2004-09-27 17:18           ` Georg Bauhaus [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