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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "G.B." Newsgroups: comp.lang.ada Subject: Re: Ada 2012 Constraints (WRT an Ada IR) Date: Tue, 29 Nov 2016 09:17:36 +0100 Organization: A noiseless patient Spider Message-ID: References: Reply-To: nonlegitur@futureapps.de Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 29 Nov 2016 08:16:20 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="5209931f1b985b8ab0fa7e67741deaac"; logging-data="30314"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+u9bypBrbDLV3hd9b6VpytCxa8wq/286s=" User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:45.0) Gecko/20100101 Thunderbird/45.5.0 In-Reply-To: Cancel-Lock: sha1:C/n7C1eWsERQrusjOZLnjqKnr8s= Xref: news.eternal-september.org comp.lang.ada:32507 Date: 2016-11-29T09:17:36+01:00 List-Id: On 29.11.16 00:49, Shark8 wrote: > it certainly would be convenient if they were as then we could have an IR wherein the general form of a type-constraint is uniformly handled. The notes section of LRM 3.2.4 may be of interest here. Also, by way of extending the range of perspectives, maybe the added flexibility of predicates entails not only overlap but also separate handling. For example, being a positive (counting) number means being an integer greater than 0. So, conceptually, there is just one condition, not two as in a subtype constraint. generic type I is range <>; package G is subtype P is I with Static_Predicate => P > 0; end G; -- "HOTDOGS ARE NOT BOOKMARKS" Springfield Elementary teaching staff