comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Runtime check : what about you ?
Date: Sat, 18 Jun 2011 10:03:11 +0200
Date: 2011-06-18T10:03:11+02:00	[thread overview]
Message-ID: <1c8atg7h7vt5o.o978sy861j7s.dlg@40tude.net> (raw)
In-Reply-To: wcchb7of0d2.fsf@shell01.TheWorld.com

On Fri, 17 Jun 2011 20:29:29 -0400, Robert A Duff wrote:

> "Randy Brukardt" <randy@rrsoftware.com> 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



  reply	other threads:[~2011-06-18  8:03 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-17  9:42 Runtime check : what about you ? Yannick Duchêne (Hibou57)
2011-06-17  9:56 ` Niklas Holsti
2011-06-17 10:06 ` Martin
2011-06-17 10:43 ` Simon Wright
2011-06-17 11:35 ` J-P. Rosen
2011-06-17 16:06 ` björn lundin
2011-06-17 19:18   ` Robert A Duff
2011-06-17 20:13     ` björn lundin
2011-06-17 20:34     ` Simon Wright
2011-06-17 17:53 ` Jeffrey Carter
2011-06-17 18:59   ` Adam Beneschan
2011-06-17 20:30     ` björn lundin
2011-06-18  0:19     ` Randy Brukardt
2011-06-18  0:26     ` Randy Brukardt
2011-06-18  3:08     ` tmoran
2011-06-18  7:16     ` J-P. Rosen
2011-06-18  8:04     ` Niklas Holsti
2011-06-17 20:12   ` Vinzent Hoefler
2011-06-17 20:12 ` Vinzent Hoefler
2011-06-18  0:15 ` Randy Brukardt
2011-06-18  0:29   ` Robert A Duff
2011-06-18  8:03     ` Dmitry A. Kazakov [this message]
2011-06-18  6:56 ` Dmitry A. Kazakov
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox