comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.not.jrcarter@acm.not.spam.org>
Subject: Re: Half Constrained Array Types and Slices
Date: Sat, 11 Mar 2006 01:43:43 GMT
Date: 2006-03-11T01:43:43+00:00	[thread overview]
Message-ID: <jXpQf.4653$6I.4184@newsread3.news.pas.earthlink.net> (raw)
In-Reply-To: <PcadnS1byP7zio_ZnZ2dnUVZ_tGdnZ2d@megapath.net>

Randy Brukardt wrote:

> I don't buy this, especially in the case of modular integers, but even in
> the case of large enumeration sets (like Character). I don't see any reason
> to think that integers are special; the whole reason for allowing
> non-integer array indexes is for greater abstraction. Empty arrays are never
> very useful, but I don't think there is much reason to say that they'll
> useful in the one case but not the other. That's essentially that same as
> saying that integers are more useful as array indexes; in that case, why
> bother allowing anything else as array indexes? Of course, I was very
> against the restriction in the Containers library, too...

FWIW, my opinions are closer to Brukardt's than to Duff's. However, null arrays 
are often useful; there are whole classes of recursive algorithms that look like

return G (X (X'First) ) & F (X (Index'Succ (X'First) .. X'Last) );

with a null array terminating the recursion.

-- 
Jeff Carter
"Apart from the sanitation, the medicine, education, wine,
public order, irrigation, roads, the fresh water system,
and public health, what have the Romans ever done for us?"
Monty Python's Life of Brian
80



  reply	other threads:[~2006-03-11  1:43 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-02  5:00 Half Constrained Array Types and Slices Jeffrey R. Carter
2006-03-02  8:34 ` Dmitry A. Kazakov
2006-03-02 15:34   ` Georg Bauhaus
2006-03-02 19:37     ` Dmitry A. Kazakov
2006-03-02 20:06   ` Jeffrey R. Carter
2006-03-02 20:37     ` Dmitry A. Kazakov
2006-03-02 21:01     ` Robert A Duff
2006-03-02 20:40   ` Robert A Duff
2006-03-02 14:32 ` Larry Kilgallen
2006-03-02 20:08   ` Jeffrey R. Carter
2006-03-02 20:48   ` Robert A Duff
2006-03-06  2:16     ` Larry Kilgallen
2006-03-06 18:50       ` Martin Krischik
2006-03-02 20:38 ` Robert A Duff
2006-03-03  5:15   ` Jeffrey R. Carter
2006-03-03  8:57     ` Dmitry A. Kazakov
2006-03-03 23:41     ` Robert A Duff
2006-03-06 17:50       ` Jeff Carter
2006-03-06 18:31         ` Dmitry A. Kazakov
2006-03-07 19:02           ` Jeff Carter
2006-03-08 14:29             ` Dmitry A. Kazakov
2006-03-09 22:44               ` Robert A Duff
2006-03-10  8:46                 ` Dmitry A. Kazakov
2006-03-06 19:49         ` Stefan Lucks
2006-03-08 17:36         ` brian.b.mcguinness
2006-03-08 17:56           ` Jeff Carter
2006-03-09 22:36         ` Robert A Duff
2006-03-10  4:28           ` Jeffrey R. Carter
2006-03-10  8:46             ` Dmitry A. Kazakov
2006-03-10 17:33               ` Robert A Duff
2006-03-10 21:24                 ` Dmitry A. Kazakov
2006-03-10 17:38             ` Robert A Duff
2006-03-11  0:19               ` Randy Brukardt
2006-03-11  1:43                 ` Jeffrey R. Carter [this message]
2006-03-11  8:38                   ` Niklas Holsti
replies disabled

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