From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.0 required=3.0 tests=BAYES_20,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:ac8:44cb:: with SMTP id b11mr866662qto.60.1610059104906; Thu, 07 Jan 2021 14:38:24 -0800 (PST) X-Received: by 2002:a25:9902:: with SMTP id z2mr1395307ybn.339.1610059104721; Thu, 07 Jan 2021 14:38:24 -0800 (PST) Path: eternal-september.org!reader02.eternal-september.org!news.uzoreto.com!tr1.eu1.usenetexpress.com!feeder.usenetexpress.com!tr2.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 7 Jan 2021 14:38:24 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=2a02:c7d:897d:6600:3518:8e3:7219:4b74; posting-account=YRfoYAoAAADhSEO2nLYx10QUUvp8akYl NNTP-Posting-Host: 2a02:c7d:897d:6600:3518:8e3:7219:4b74 References: <1cc09f04-98f2-4ef3-ac84-9a9ca5aa3fd5n@googlegroups.com> <5f0c4c86-bea9-4007-b16e-b4b80749a8b5n@googlegroups.com> <97bb9444-9787-483d-9eff-e51b5fd58daan@googlegroups.com> <2ef3d694-b382-4274-adc1-92345f31a602n@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Lower bounds of Strings From: Stephen Davies Injection-Date: Thu, 07 Jan 2021 22:38:24 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:61062 List-Id: On Thursday, 7 January 2021 at 21:39:26 UTC, Randy Brukardt wrote: > "Stephen Davies" wrote: > ... > > Reminder, my justification is not only for strings being indexed by > > numeric literals, e.g.: > > subtype Some_Range is Positive range 4..5; > > ... > > Some_String(Some_Range) -- fails if Some_String'First /= 1 > I don't follow this at all. You say your justification "is not only for > strings" but only give a string example. I said not "not only for strings being indexed by *numeric literals*" then gave an example where the index was a subtype. > And what you want is essentially the semantics of a vector container For the foreseeable future, people are going to use arrays, especially Strings. I want a small change that will make code more readable and could prevent erroneous behaviour.