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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,88858d66e427dbcb X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-06 18:28:53 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!newsfeed.news2me.com!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!intern1.nntp.aus1.giganews.com!nntp.giganews.com!nntp.gbronline.com!news.gbronline.com.POSTED!not-for-mail NNTP-Posting-Date: Thu, 06 Nov 2003 20:28:51 -0600 Date: Thu, 06 Nov 2003 21:29:44 -0500 From: Wes Groleau Reply-To: groleau@freeshell.org Organization: Ain't no organization here! User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en, es-mx, pt-br, fr-ca MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Short circuit boolean evaluation References: <87f5a614.0311051528.30450c7a@posting.google.com> <87f5a614.0311061144.360b3325@posting.google.com> In-Reply-To: <87f5a614.0311061144.360b3325@posting.google.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 69.9.86.31 X-Trace: sv3-9YXZe3/FEdoSr/ffearFUS39woxGT/byjC6wnLJZ9YJwbRmL0Kmx63c3/2exAg3ttZ2gL5kCKI9qZdI!DSOdSVDg7VZB1iQDXjsps2PdoXMyY/nnUUTxltNtHzNNqaBZ4OMOEq86djB0rTJ/VCbJgemSrMvt X-Complaints-To: abuse@gbronline.com X-DMCA-Complaints-To: abuse@gbronline.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.1 Xref: archiver1.google.com comp.lang.ada:2179 Date: 2003-11-06T21:29:44-05:00 List-Id: 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)