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.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FROM_STARTS_WITH_NUMS autolearn=no autolearn_force=no version=3.4.4 X-Received: by 10.107.70.6 with SMTP id t6mr12975039ioa.134.1517333508812; Tue, 30 Jan 2018 09:31:48 -0800 (PST) X-Received: by 10.157.114.140 with SMTP id t12mr1695134otj.4.1517333508408; Tue, 30 Jan 2018 09:31:48 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!feed.usenet.farm!feeder4.usenet.farm!border1.nntp.ams1.giganews.com!nntp.giganews.com!peer01.ams1!peer.ams1.xlned.com!news.xlned.com!peer02.am4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!g80no1324189itg.0!news-out.google.com!s63ni1968itb.0!nntp.google.com!w142no1331251ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 30 Jan 2018 09:31:48 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=85.245.161.186; posting-account=rhqvKAoAAABpikMmPHJSZh4400BboHwT NNTP-Posting-Host: 85.245.161.186 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <6972f8eb-6130-4c47-b27a-f8dd0afeb171@googlegroups.com> Subject: Re: discontinuous subtype without aspect From: Mehdi Saada <00120260a@gmail.com> Injection-Date: Tue, 30 Jan 2018 17:31:48 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Body-CRC: 2178677729 X-Received-Bytes: 2367 Xref: reader02.eternal-september.org comp.lang.ada:50211 Date: 2018-01-30T09:31:48-08:00 List-Id: > ...because people didn't want set constraints. I still fail to understand why, as you point out, a static predicate is not quite a replacement.=20 It is a replacement, but I thought it was a shame there existed now, two sy= ntaxic constructs to express the same things. subtype FOO is BAR range Val5..Val6; subtype FOO is BAR with STATIC_PREDICATE =3D> FOO in membership_choice; The second can express much more, but they still overlap, which isn't nice = and clean. Beside, I get it that a range is continuous by definition, but I still thin= k "range 1..5|8..9" could be read as "range 1..5 and range 8..9" or "in 1..= 5|8..9". Forbide that for arrays, and that would be it. Or better, I can subtype FOO is BAR in Val5..Val6|Val10; No need for range = at all anymore, even for arrays. "in" is all that's needed. Fewer keywords = too. A tool could also easily, for matter of compatibility, parse existing = code and change every and each "range X..Y" by "in X..Y", and qualify X and= Y by the parent's subtype's name. Is that what you mean by set constraints ?