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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: class wide iterable (and indexable) Date: Wed, 23 Jan 2019 16:47:41 -0600 Organization: JSA Research & Innovation Message-ID: References: <2a6929c5-72fa-4d84-953a-44ea4597ab38@googlegroups.com> <75328dc5-fc59-4228-b77e-77ba6e5101c3@googlegroups.com> <9eedf818-8bfb-465b-afe5-aa3fb0525948@googlegroups.com> Injection-Date: Wed, 23 Jan 2019 22:47:42 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="25443"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader01.eternal-september.org comp.lang.ada:55347 Date: 2019-01-23T16:47:41-06:00 List-Id: "Shark8" wrote in message news:9eedf818-8bfb-465b-afe5-aa3fb0525948@googlegroups.com... > Wouldn't this be a non-issue if we could Static_Predicate Array-types like > so? > > Type Some_String is Array(Positive range <>) of Character > with Static-Predicate => Some_String'First = 1; The idea of a static predicate is for them to stand-in for proper set constraints (I would have preferred the latter, but I was alone on that), so they don't have anything to do with array bounds. You can do this with Dynamic_Predicates, but it doesn't make the slices act differently, so problems will ensue. Changing the semantics of slices (essentially to force sliding everywhere) would require some sort of declaration beyond just the predicate. Randy.