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-Thread: 103376,99e73f65ea2533b9 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder.news-service.com!news.buerger.net!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: and then... (a curiosity) Date: Tue, 2 Sep 2008 19:11:29 -0500 Organization: Jacob's private Usenet server Message-ID: References: <18b41828-bda4-4484-8884-ad62ce1c831d@f36g2000hsa.googlegroups.com> <57qdnfULQ9tzKCHVnZ2dnUVZ_tHinZ2d@comcast.com> <48bd0003$1@news.post.ch> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: jacob-sparre.dk 1220400826 10273 69.95.181.76 (3 Sep 2008 00:13:46 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Wed, 3 Sep 2008 00:13:46 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512 Xref: g2news2.google.com comp.lang.ada:7612 Date: 2008-09-02T19:11:29-05:00 List-Id: "Robert A Duff" wrote in message news:wccprnm708a.fsf@shell01.TheWorld.com... ... > At AdaCore, we always say "and then", never "and". I don't like that > style (but of course I obey it, because obeying coding conventions is a > good thing in itself). I can't speak for AdaCore, but we (and me personally) have a similar convention. It originated in code quality concerns: on the original 8086, "and then" could be optimized far better than "and" (because the former is branching, and all conditionals on the 8086 required branching; the latter requires Boolean values, which had to be created out of branching). These days, it's mostly premature optimization. Note that I avoid the convention in two cases: where a bunch of Boolean values are involved (no excess branching is needed), and in rare cases when I need both operands evaluated. And I always comment expressions where the order is significant or evaluation is significant. Randy.