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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham 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-22 13:53:43 PST Path: archiver1.google.com!news2.google.com!postnews1.google.com!not-for-mail From: dewar@gnat.com (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: short-circuit control forms (& 'long names are doom') Date: 22 Jun 2001 13:53:42 -0700 Organization: http://groups.google.com/ Message-ID: <5ee5b646.0106221253.1a93fc4a@posting.google.com> References: <3B30F836.D700DAA3@raytheon.com> <3B32038D.F1296C79@cadence.com> <3B336844.9B58ED9A@ftw.rsc.raytheon.com> NNTP-Posting-Host: 205.232.38.14 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 993243223 3919 127.0.0.1 (22 Jun 2001 20:53:43 GMT) X-Complaints-To: groups-support@google.com NNTP-Posting-Date: 22 Jun 2001 20:53:43 GMT Xref: archiver1.google.com comp.lang.ada:9047 Date: 2001-06-22T20:53:43+00:00 List-Id: Wes Groleau wrote in message news:<3B336844.9B58ED9A@ftw.rsc.raytheon.com>... > Since nearly THIRTY YEARS AGO (and probably longer), folks have > known and written of the foolishness of misguided "optimization" > efforts (emphasis mine): My preference for using the short circuited forms has nothing to do with efficiency, it has to do with readability. My feeling is that in English, the short circuited semantics are natural. if you are in an airport, and you hear an announcement that says "All passengers on China airlines flight 182 to Beijing who are holding ....... You can stop listening to the announcement at or slightly before the .... (you might stop right after China :-) You do not listen to all parts of this announcement, consider whether each part applies to you, and then say, gosh, of those 7 things, 6 are true for me, but I am not on flight 182, so I don't need to proceed to gate 36 :-) On the other hand when it comes to Boolean variables if a or b then then the short circuit form seems to me to read oddly, and I prefer the simple OR, again, nothing whatever to do with optimization.