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-20 15:44:41 PST Newsgroups: comp.lang.ada Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.abs.net!uunet!dca.uu.net!ash.uu.net!xyzzy!nntp From: Jeffrey Carter Subject: Re: short-circuit control forms X-Nntp-Posting-Host: e246420.msc.az.boeing.com Content-Type: text/plain; charset=us-ascii Message-ID: <3B312260.728686B5@boeing.com> Sender: nntp@news.boeing.com (Boeing NNTP News Access) Content-Transfer-Encoding: 7bit Organization: The Boeing Company X-Accept-Language: en References: <3B30F836.D700DAA3@raytheon.com> Mime-Version: 1.0 Date: Wed, 20 Jun 2001 22:23:28 GMT X-Mailer: Mozilla 4.5 [en]C-CCK-MCD Boeing Kit (WinNT; U) Xref: archiver1.google.com comp.lang.ada:8945 Date: 2001-06-20T22:23:28+00:00 List-Id: "James A. Krzyzanowski" wrote: > > Looking for expert opinions... > > We have a company standard which states: > "standard => Use short-circuit control forms to specify the order of > conditions when the failure of one condition means that > the other condition will raise an exception. > guideline => Avoid short-circuit control forms otherwise." > > 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". > > If using "and then" and "or else" will make our software quicker, and > then the compiler doesn't optimize any better anyway, does anybody have > a good reason why we should NOT use short-circuit control forms? Do you know that using short-circuit forms makes your software quicker? If you have measured the speed with and without the short-circuit forms, and found it to be statistically different at the p=0.1 level or better AND the difference is necessary for the software to function correctly, then your software engineers are justified in their actions. If not, you do not have software engineers. You have coders who are wasting their time and the company's money on ignorant FUD, and introducing a new source of error into working software. At best you should fire them and replace them with software engineers; at worst you should require them to adhere to your company standard unless they have justification for deviating. -- Jeffrey Carter