comp.lang.ada
 help / color / mirror / Atom feed
From: Wes Groleau <groleau@freeshell.org>
Subject: Re: Short circuit boolean evaluation
Date: Thu, 06 Nov 2003 21:29:44 -0500
Date: 2003-11-06T21:29:44-05:00	[thread overview]
Message-ID: <XoqdnSDfq97-njaiRVn-iw@gbronline.com> (raw)
In-Reply-To: <87f5a614.0311061144.360b3325@posting.google.com>

svaa wrote:
> I wouldn't call it a few  keystrokes, I use it in every condition. 

I'm sorry to hear that.  The short circuit form
sends a message to the compiler AND the reader
that in order to avoid an exception, the evaluation
must be short-circuited.

Using it where it isn't needed is misleading maintenance
programmers.  If your timing is so tight that you MUST
save one or two clock cycles that way, then you are still
in trouble after doing so.  At least, if you are doing it
for efficiency, say so in a comment.

Does the REQUIREMENTS spec have such low-level
implementation details as "test this one first
and then that one only if ..." ?  If no, then
why insist it be in the code?

-- 
Wes Groleau
-----------
Curmudgeon's Complaints on Courtesy:
http://www.onlinenetiquette.com/courtesy1.html
(Not necessarily my opinion, but worth reading)




  parent reply	other threads:[~2003-11-07  2:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-05 23:28 Short circuit boolean evaluation svaa
2003-11-06  3:49 ` Steve
2003-11-06 19:44   ` svaa
2003-11-06 23:03     ` tmoran
2003-11-07  0:26     ` Mark Lorenzen
2003-11-07 21:27       ` Simon Wright
2003-11-07 22:59         ` Mark Lorenzen
2003-11-07  2:29     ` Wes Groleau [this message]
2003-11-07  3:48     ` Steve
2003-11-10 11:18     ` Georg Bauhaus
2003-11-07  0:49 ` Gautier Write-only
2003-11-07  3:03   ` Alexandre E. Kopilovitch
2003-11-10 17:36   ` Warren W. Gay VE3WWG
replies disabled

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