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-Thread: 103376,1cb75f0476fe2d1a X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread3.news.pas.earthlink.net.POSTED!a6202946!not-for-mail From: "Jeffrey R. Carter" Organization: jrcarter at acm dot org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Half Constrained Array Types and Slices References: <1141667416.163432.304280@p10g2000cwp.googlegroups.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Sat, 11 Mar 2006 01:43:43 GMT NNTP-Posting-Host: 67.150.68.155 X-Complaints-To: abuse@earthlink.net X-Trace: newsread3.news.pas.earthlink.net 1142041423 67.150.68.155 (Fri, 10 Mar 2006 17:43:43 PST) NNTP-Posting-Date: Fri, 10 Mar 2006 17:43:43 PST Xref: g2news1.google.com comp.lang.ada:3329 Date: 2006-03-11T01:43:43+00:00 List-Id: 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