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=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,db5c6b2ef47d4b9e X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-06-20 12:51:27 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!fr.usenet-edu.net!usenet-edu.net!enst!enst.fr!not-for-mail From: "Beard, Frank" Newsgroups: comp.lang.ada Subject: RE: short-circuit control forms Date: Wed, 20 Jun 2001 15:50:03 -0400 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: avanie.enst.fr 993066681 75096 137.194.161.2 (20 Jun 2001 19:51:21 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Wed, 20 Jun 2001 19:51:21 +0000 (UTC) To: "'comp.lang.ada@ada.eu.org'" Return-Path: X-Mailer: Internet Mail Service (5.5.2448.0) Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.4 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , List-Archive: Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:8935 Date: 2001-06-20T15:50:03-04:00 -----Original Message----- From: James A. Krzyzanowski [mailto:James_A_Krzyzanowski@raytheon.com] > Our software engineers believe that using short-circuit control forms > will make our software more efficient (speed-wise). So, they have been > replacing every "and" with "and then" and every "or" with "or else". I've heard this before, as well. And it makes sense, unless there is some problem or inefficiency with generating the underlying branch statements. It seems to me that the "and" and "or" should have been implemented in the short circuit form to begin with, instead of requiring "and then" and "or else". As soon as one of the conditions is FALSE for "and" or TRUE for "or", there is no need to check the remaining arguments. Frank Beard