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.2 required=5.0 tests=BAYES_00,FROM_WORDY, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,25aa3c7e1b59f7b5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-01-03 13:33:01 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed2.news.rcn.net!feed1.news.rcn.net!rcn!not-for-mail From: "Frank J. Lhota" Newsgroups: comp.lang.ada Subject: Re: A case where Ada defaults to unsafe? Date: Thu, 3 Jan 2002 16:32:19 -0500 Message-ID: References: <3C34BF2C.6030500@mail.com> Reply-To: "Frank J. Lhota" X-Trace: UmFuZG9tSVYxN7byWZvFLNIsmMtTNU7NDhucP+dO7GM0A1CpP7dU19b+gk9bR/MG X-Complaints-To: abuse@rcn.com NNTP-Posting-Date: 3 Jan 2002 21:32:22 GMT X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Priority: 3 X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MSMail-Priority: Normal Xref: archiver1.google.com comp.lang.ada:18491 Date: 2002-01-03T21:32:22+00:00 List-Id: "Hyman Rosen" wrote in message news:3C34BF2C.6030500@mail.com... > It occurs to me that there is a case where the opposite seems to > be true. In C/C++, the && and || binary operators short-circuit, > evaluating their right operand only if necessary. In Ada, it is > necessary to specify "and then" and "or else" for this behavior, > otherwise the order of evaluation of the two sides is unspecified > if the simple "and" and "or" forms are used. The situation is quite similar in C/C++; if you use the siumpler & and | operators, they do not short-circuit. In either C/C++ or Ada, experienced programmers know what needs to be done in order to get short-circuiting.