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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,80435549e92d4e0c X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news4.google.com!newshub.sdsu.edu!newsfeed.media.kyoto-u.ac.jp!news1.optus.net.au!optus!newsfeeder.syd.optusnet.com.au!news.optusnet.com.au!newsfeed.pacific.net.au!nasal.pacific.net.au!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Charles container library usage examples From: David Trudgett Organization: Very little? References: <87mzmssqbq.fsf@ludovic-brenta.org> <4321a2e0_3@newsfeed.slurp.net> <43240c16$0$27555$9b4e6d93@newsread4.arcor-online.net> <7tJVe.33732$d5.188919@newsb.telia.net> Message-ID: User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:8lghJHcgLKjk2mjUkckEo+REOPw= MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Wed, 14 Sep 2005 16:39:48 +1000 NNTP-Posting-Host: 61.8.36.82 X-Complaints-To: news@pacific.net.au X-Trace: nasal.pacific.net.au 1126680261 61.8.36.82 (Wed, 14 Sep 2005 16:44:21 EST) NNTP-Posting-Date: Wed, 14 Sep 2005 16:44:21 EST Xref: g2news1.google.com comp.lang.ada:4644 Date: 2005-09-14T16:39:48+10:00 List-Id: Bj�rn Persson writes: > > The Ada compiler can omit checks if it can prove that they will never > fail. While even the C compiler can optimize away code that will never > have any effect, I would think it's a lot more difficult to prove that > a hand-coded run-time check is unnecessary when the compiler doesn't > know what it's for. Fair enough, that sounds plausible. Of course, if one were writing checking code in C, for instance, one would probably surround it with IFDEFs so it could be manually excluded after testing. Not as granular and tidy, perhaps, as automatic suppression of redundant checks, but similar, nonetheless. Cheers, David -- David Trudgett http://www.zeta.org.au/~wpower/ Omnis enim res, quae dando non deficit, dum habetur et non datur, nondum habetur, quomodo habenda est. For if a thing is not diminished by being shared with others, it is not rightly owned if it is only owned and not shared. Book I, Chapter 1 "De doctrina christiana" "Corpus Christianorum", "Series latina", Vol. 32, p. 6, lines 10-11. Written 397 AD by Saint Augustinus