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!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!reality.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Ada 2012 Constraints (WRT an Ada IR) Date: Thu, 1 Dec 2016 16:07:35 -0600 Organization: JSA Research & Innovation Message-ID: References: <8b3ea401-822b-4b51-be48-133861ef2e0b@googlegroups.com> <5eb00dbc-d36e-47e5-bc76-0d0683281c09@googlegroups.com> NNTP-Posting-Host: rrsoftware.com X-Trace: franka.jacob-sparre.dk 1480629998 9397 24.196.82.226 (1 Dec 2016 22:06:38 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 1 Dec 2016 22:06:38 +0000 (UTC) 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.6157 Xref: news.eternal-september.org comp.lang.ada:32549 Date: 2016-12-01T16:07:35-06:00 List-Id: "Shark8" wrote in message news:5eb00dbc-d36e-47e5-bc76-0d0683281c09@googlegroups.com... On Wednesday, November 30, 2016 at 3:17:51 PM UTC-7, Randy Brukardt wrote: ... >> In any case, the semantic description of the two constructs is different, >> although as far as I know the effect is the same. My experience in Ada is >> that whenever you think you can collapse Ada constructs, you eventually >> will >> be proved wrong, either by a new ACATS test, a customer bug report, or by >> some future change in the language (either a bug fix or new revision). I >> would generally reecommend avoiding that as much as possible. >Then maybe this is a valid issue to put in an Ada-comment; the thinking of >things in >terms of sets is something that's been in Ada since its inception (eg >case-coverage) > -- and acknowledging that the common definition of 'type' as "a set of > values and > a set of operations on those values" is solid enough that codifying those > constructs > as the same would be useful to implementations, no? Well, like everything it would be different and potentially incompatible. Proving that it is *not* incompatible or inconsistent would be difficult, yet there is no chance that such a non-required change would be made absent such a proof. In any case, I would have preferred that Ada not have static predicates and rather have "set constraints", which would have made ranges and sets consistent semantically. I pushed that alternative repeatedly at meetings, but I never got any traction - I pretty much was alone in thinking that was a better option. Ergo, I think any proposal like the one you are suggesting would be a very uphill battle. (And then you have to decide which battle of the many possibilities is worth such an effort. If I was going to undertake such a battle, I'd rather focus on either allowing object overloading or allowing types in private parts of protected objects - both of which would solve long standing issues and unify the language a bit more; changing the description of the language is a lot of running in place. Bob Duff likes to say that he doesn't think we should spend any time on an issue unless a user or implementer could get it wrong otherwise. I don't think such a description change could have any real effect on implementations, so it would be a lot of work for no real gain (and some risk of introducing errors on top of that). Randy.