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.5 required=3.0 tests=BAYES_05,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:a37:495:: with SMTP id 143mr19832845qke.37.1610892633825; Sun, 17 Jan 2021 06:10:33 -0800 (PST) X-Received: by 2002:a25:3891:: with SMTP id f139mr30293009yba.465.1610892633638; Sun, 17 Jan 2021 06:10:33 -0800 (PST) Path: eternal-september.org!reader02.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 17 Jan 2021 06:10:33 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=90.218.114.233; posting-account=YRfoYAoAAADhSEO2nLYx10QUUvp8akYl NNTP-Posting-Host: 90.218.114.233 References: <1cc09f04-98f2-4ef3-ac84-9a9ca5aa3fd5n@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <1ea70290-a1a8-4a63-8f38-922e966084c9n@googlegroups.com> Subject: Re: Lower bounds of Strings From: Stephen Davies Injection-Date: Sun, 17 Jan 2021 14:10:33 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:61158 List-Id: On Friday, 15 January 2021 at 17:35:54 UTC, Stephen Davies wrote: > On Friday, 15 January 2021 at 11:41:24 UTC, J-P. Rosen wrote: > > function Slide (S : String) return String is > > (S(S'First) & S (S'First+1 .. S'Last)); > To me, this is a fundamental enough operation that, in the absence of > being able to specify a subtype where it happens automatically, it at > least deserves to be an attribute. Also, a Slide function does not work for "out" and "in out" parameters. Admittedly, ehh.p...'s workaround does solve this, but I would prefer a proper solution in the language, e.g. a Slide attribute that acts as a view conversion.