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.36.33.140 with SMTP id e134mr1193237ita.0.1480865340061; Sun, 04 Dec 2016 07:29:00 -0800 (PST) X-Received: by 10.157.44.172 with SMTP id p41mr3526884otb.6.1480865339920; Sun, 04 Dec 2016 07:28:59 -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!feeder.erje.net!1.eu.feeder.erje.net!enother.net!enother.net!enother.net!peer01.fr7!futter-mich.highwinds-media.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!n6no2320802qtd.0!news-out.google.com!m27ni1077qtf.1!nntp.google.com!n6no2320801qtd.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 4 Dec 2016 07:28:59 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2601:191:8303:2100:5985:2c17:9409:aa9c; posting-account=fdRd8woAAADTIlxCu9FgvDrUK4wPzvy3 NNTP-Posting-Host: 2601:191:8303:2100:5985:2c17:9409:aa9c References: <92ed75e9-baae-455c-9e34-53348dc6eaef@googlegroups.com> <03847fd7-5699-48de-bb3c-ef5512398f26@googlegroups.com> <3ef819e8-55f7-4ef7-9f37-77e6abc33f98@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <47366b42-c0a3-41bf-a44a-5241c109d60f@googlegroups.com> Subject: Re: Ada 2012 Constraints (WRT an Ada IR) From: Robert Eachus Injection-Date: Sun, 04 Dec 2016 15:28:59 +0000 Content-Type: text/plain; charset=UTF-8 X-Received-Body-CRC: 94764168 X-Received-Bytes: 2775 Xref: news.eternal-september.org comp.lang.ada:32601 Date: 2016-12-04T07:28:59-08:00 List-Id: On Saturday, December 3, 2016 at 11:27:02 AM UTC-5, Dmitry A. Kazakov wrote: > > But in this discussion predicates have the meaning defined in Ada RM. My > point was about their usefulness for Ada programming. I've been following this discussion with puzzlement. Assertions can be wonderful tools when debugging (usually during unit test). But the most important feature of pragma Assert is that it can be turned off globally in production code. If there are Booleans which do need to be checked at run time, for example when validating inputs, those checks often should have a tightly wrapped exception handler, and certainly should not use pragma Assert. I would consider it a major bug to have a pragma Assert that could fail at run-time absent a hardware failure or some such. (Even though it would be turned off in production code.)