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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Received: by 2002:ae9:c203:: with SMTP id j3mr3461390qkg.12.1572894790242; Mon, 04 Nov 2019 11:13:10 -0800 (PST) X-Received: by 2002:a9d:baf:: with SMTP id 44mr19275800oth.182.1572894790115; Mon, 04 Nov 2019 11:13:10 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!j16no10647921qtl.0!news-out.google.com!p4ni146qtu.1!nntp.google.com!j16no10647904qtl.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 4 Nov 2019 11:13:09 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=146.5.2.231; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 146.5.2.231 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <72cf1559-a51f-4a7d-a79e-fe349f833883@googlegroups.com> Subject: Re: How to best make a custom range? From: Shark8 Injection-Date: Mon, 04 Nov 2019 19:13:10 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:57473 Date: 2019-11-04T11:13:09-08:00 List-Id: On Monday, November 4, 2019 at 11:55:42 AM UTC-7, Dmitry A. Kazakov wrote: > On 2019-11-04 19:49, Andrew Shvets wrote: > > Mostly to have a set of values that I can select at random. > > That is not subtype, which is the point. If it were made a "subtype" as > was suggested per misuse of dynamic predicate, It's not Dynamic_Predicate, it's Static_Predicate. > then that would break > most of the code by polluting it with Constraint_Error raised in most > unexpected places. Constraint_Error is the normal/expected exception, perhaps you are thinking Assertion_Error? > Which is the reason why it should not be a subtype, > because it is not (see LSP). Everywhere that Character is requested, a Test_Character is valid -- Just like everywhere Integer is requested, Natural is valid.