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=-1.9 required=3.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:ac8:4711:: with SMTP id f17mr7724846qtp.256.1610802829810; Sat, 16 Jan 2021 05:13:49 -0800 (PST) X-Received: by 2002:a25:4148:: with SMTP id o69mr25002110yba.462.1610802829620; Sat, 16 Jan 2021 05:13:49 -0800 (PST) Path: eternal-september.org!reader02.eternal-september.org!feeder1.feed.usenet.farm!feed.usenet.farm!tr3.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: Sat, 16 Jan 2021 05:13:49 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=2a02:c7f:3883:a000:903a:ca20:bc87:7c41; posting-account=YRfoYAoAAADhSEO2nLYx10QUUvp8akYl NNTP-Posting-Host: 2a02:c7f:3883:a000:903a:ca20:bc87:7c41 References: <1cc09f04-98f2-4ef3-ac84-9a9ca5aa3fd5n@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <1924af73-a26f-4b8b-b2e2-97f0dd82d791n@googlegroups.com> Subject: Re: Lower bounds of Strings From: Stephen Davies Injection-Date: Sat, 16 Jan 2021 13:13:49 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:61154 List-Id: On Saturday, 16 January 2021 at 09:30:19 UTC, G.B. wrote: > On 15.01.21 11:24, Stephen Davies wrote: > > Long_String_Name(1..2) is much nicer than > > Long_String_Name(Long_String_Name'First..Long_String_Name'First+1) > Avoid literals for indexing. My very next example used a subtype for indexing, which you omitted from your reply. It makes me wonder if people like X(X'First) because it gives the comfort of not using literals, even though it's basically equivalent to X[0] in C, Python, etc. > "On which side are you on 1 vs 0 for The First?" I like that Ada gives the choice of "Positive range <>" or "Natural range <>".