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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.107.6.99 with SMTP id 96mr1448764iog.71.1481946384767; Fri, 16 Dec 2016 19:46:24 -0800 (PST) X-Received: by 10.157.4.119 with SMTP id 110mr371463otc.11.1481946384739; Fri, 16 Dec 2016 19:46:24 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!75no921739ite.0!news-out.google.com!u18ni502ita.0!nntp.google.com!75no921735ite.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 16 Dec 2016 19:46:24 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=67.0.242.189; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 67.0.242.189 References: <999c67b0-4478-4d2b-8108-32ac48fe6316@googlegroups.com> <5cc38920-b746-48f6-87d4-1cf8effa2f02@googlegroups.com> <13c3516c-129a-4721-a4a3-ef169a2df10c@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <8c3a4926-be23-4665-999c-859c0eb54ccc@googlegroups.com> Subject: Re: Ada 2012 Constraints (WRT an Ada IR) From: Shark8 Injection-Date: Sat, 17 Dec 2016 03:46:24 +0000 Content-Type: text/plain; charset=UTF-8 Xref: news.eternal-september.org comp.lang.ada:32898 Date: 2016-12-16T19:46:24-08:00 List-Id: On Friday, December 16, 2016 at 1:28:55 AM UTC-7, Dmitry A. Kazakov wrote: > On 15/12/2016 23:34, Shark8 wrote: > >> - The concept is wrong. > > > > The concept of (a) a type consisting of two parts (1) a set of > > values, and (b) a set of operations upon those values; > > The notion of type violated arbitrary constraining violates. What? > > > or (b) that there ought > > to be a way to represent constraints on the values that a type can use? > > Right, as it is in plain contradiction with both the definition of a > type you quoted as well as with the concept of static types. Ada specifiably has the ability to add a constraint -- like RANGE 1..INTEGER'LAST -- and has had that from its inception. *THAT* is Ada's notion of subtype. The question of the thread is about representing such constraints.