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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.182.106.12 with SMTP id gq12mr19789792obb.6.1434134626706; Fri, 12 Jun 2015 11:43:46 -0700 (PDT) X-Received: by 10.140.101.22 with SMTP id t22mr242767qge.32.1434134626666; Fri, 12 Jun 2015 11:43:46 -0700 (PDT) Path: buffer1.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!h15no2224111igd.0!news-out.google.com!4ni1210qgh.1!nntp.google.com!z60no871538qgd.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 12 Jun 2015 11:43:46 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=75.99.9.146; posting-account=s89PEgoAAABHs2ETFyOrCeTQVQJAfzKq NNTP-Posting-Host: 75.99.9.146 References: <4f4cd4b1-0a6d-441b-a4f7-98add70e4e1e@googlegroups.com> <1p71vf5ckbudu$.1qcb9ot1jpysk.dlg@40tude.net> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <5e52d05c-62de-439f-8e2f-750ce77e4e47@googlegroups.com> Subject: Re: Is this a bug in my code or the compiler? From: marciant@earthlink.net Injection-Date: Fri, 12 Jun 2015 18:43:46 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: number.nntp.giganews.com comp.lang.ada:193599 Date: 2015-06-12T11:43:46-07:00 List-Id: On Friday, June 12, 2015 at 2:11:33 PM UTC-4, Dmitry A. Kazakov wrote: >=20 > The name suggests that short-cut logical operations were considered as a > syntax sugar to save keystrokes - a replacement for nested IFs. Quickly > enough it was discovered that in some contexts you cannot have IFs (e.g. = in > barriers) and that people disliked nested IFs anyway. >=20 (nit-picker alert! ;-) They are called short-circuit not short-cut, short in that normally all par= ts of a boolean expression are evaluated (even those that would cause an ex= ception with elements some values). That was to improve testability: you a= re normally sure that some part of an expression isn't actually never evalu= ated with some given test input. It also can minimize execution time varia= nce. I think that the canonical example is something like "if x/=3D0 and then y/= x=3Dn then ..." but I see what you mean by less nested if's. But avoiding= the nested if's was less about minimizing typing and more about increasing= readability.