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.182.110.196 with SMTP id ic4mr20498063obb.41.1419322951127; Tue, 23 Dec 2014 00:22:31 -0800 (PST) X-Received: by 10.140.22.48 with SMTP id 45mr432715qgm.5.1419322951102; Tue, 23 Dec 2014 00:22:31 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!h15no16424440igd.0!news-out.google.com!r1ni101qat.1!nntp.google.com!bm13no501223qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 23 Dec 2014 00:22:31 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=86.207.202.131; posting-account=ku4DIwoAAACRt0A2H-srh5aOk_YodLAH NNTP-Posting-Host: 86.207.202.131 References: <2430252d-52a1-4609-acef-684864e6ca0c@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <0a718b39-ebd3-4ab5-912e-f1229679dacc@googlegroups.com> Subject: Re: {Pre,Post}conditions and side effects From: =?ISO-8859-1?Q?Jean_Fran=E7ois_Martinez?= Injection-Date: Tue, 23 Dec 2014 08:22:31 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 2309 X-Received-Body-CRC: 770507459 Xref: news.eternal-september.org comp.lang.ada:24203 Date: 2014-12-23T00:22:31-08:00 List-Id: On Monday, December 22, 2014 6:18:25 PM UTC+1, Brad Moore wrote: > On 14-12-22 09:22 AM, Jean Fran=E7ois Martinez wrote: > > SEcond and biggest problem is that it is too late. >=20 > Too late for Ada 2012, but not for Ada 202X. Or you could consider using= =20 > SPARK 2014 for this code, as it already has this Global aspect. Or you=20 > might ask your compiler vender to provide an implementation specific=20 > solution. >=20 > Brad >=20 >=20 By too late I meant that once something is allowed it is difficult to make = it illegal since a number of programs would no longer compile. Now function= s invoked in pre/post consitions are only supposed to check parms so most o= f the time they should be quite simple and sensible programmers would avoi= d side effects (except a few debugging Puts) but I still feel uncomfortable= .about this Cish "be careful while playing russian roulette" philosphy. At= least the Rationale should have brought this point to attention. Author m= ust have assummed we were bright enough to figure it. :) Jean Fran=E7ois Martinez