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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b44a149ee4e73a99 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!news.glorb.com!feeder.erje.net!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!gegeweb.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Runtime check : what about you ? Date: Sat, 18 Jun 2011 10:03:11 +0200 Organization: cbb software GmbH Message-ID: <1c8atg7h7vt5o.o978sy861j7s.dlg@40tude.net> References: Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: xoMSsrull8EKozswAy8E3Q.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: g2news2.google.com comp.lang.ada:20919 Date: 2011-06-18T10:03:11+02:00 List-Id: On Fri, 17 Jun 2011 20:29:29 -0400, Robert A Duff wrote: > "Randy Brukardt" writes: > >> I personally believe in the seatbelt analogy: "turning off checks in >> released software is like using seatbelts in the driveway and then taking >> them off when you reach the highway". For me, this also applies to >> assertions and contracts as well -- I only turn these things off if they are >> tremendously expensive (in which case I usually remove them permanently). I >> know there are others (like Bob Duff) who think this analogy is silly. > > No, I don't think it's silly. I think it applies in some cases, > but not others. I think turning checks on or off is a difficult > engineering decision that should depend on various factors. I think it is rather simply. Redundant checks are removed, all others stay. It is exactly same as removing an "if" statement. If you know that the condition is trivially false, you do. If you don't know it, you don't. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de