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,FREEMAIL_FROM autolearn=ham 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:50:27 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!195.64.68.27!newsgate.cistron.nl!news2.euro.net!uunet!ash.uu.net!spool0901.news.uu.net!spool0900.news.uu.net!reader0902.news.uu.net!not-for-mail Message-ID: <3C34D252.4070307@mail.com> Date: Thu, 03 Jan 2002 16:51:14 -0500 From: Hyman Rosen User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.7+) Gecko/20011228 X-Accept-Language: en-us MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: A case where Ada defaults to unsafe? References: <3C34BF2C.6030500@mail.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Organization: KBC Financial Products Cache-Post-Path: master.nyc.kbcfp.com!unknown@mosquito.nyc.kbcfp.com X-Cache: nntpcache 2.3.3 (see http://www.nntpcache.org/) NNTP-Posting-Host: 204.253.250.10 X-Trace: 1010094624 reader2.ash.ops.us.uu.net 4516 204.253.250.10 Xref: archiver1.google.com comp.lang.ada:18493 Date: 2002-01-03T16:51:14-05:00 List-Id: Frank J. Lhota wrote: > 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. In C/C++ "everyone" knows that & and | are for bit twiddling and && and || are for combining logical expressions. But get away from C/C++ for a moment. In pure Ada terms, isn't it less safe for the defaults to be "and" and "or" instead of "and then" and "or else"?