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,25aa3c7e1b59f7b5 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-01-03 16:15:15 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!hub1.nntpserver.com!newsfeed01.sul.t-online.de!t-online.de!newsfeed.easynews.net!newsfeed2.easynews.net!easynews.net!news.cid.net!news.enyo.de!news1.enyo.de!not-for-mail From: Florian Weimer Newsgroups: comp.lang.ada Subject: Re: A case where Ada defaults to unsafe? Date: Fri, 04 Jan 2002 01:15:01 +0100 Organization: Enyo's not your organization Message-ID: <87itajynsq.fsf@deneb.enyo.de> References: <3C34BF2C.6030500@mail.com> <3C34D252.4070307@mail.com> <3C34E43E.5070906@mail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cancel-Lock: sha1:3t9OcaSUTD3Bibnk5cpDW4o1yIc= Xref: archiver1.google.com comp.lang.ada:18503 Date: 2002-01-04T01:15:01+01:00 List-Id: Hyman Rosen writes: > You haven't answered my question, though. Isn't the commutative semantic > less safe than the short circuit one? IMGO, it's just different. If the code doesn't work using (the equivalent of) "and", why should it work reliably using "and then"? However, there is not much choice from a language design point of view: The short-circuit form of the operator cannot be meaningfully redefined, but the commutative form can (perhaps) be. (In fact, your claim "In C/C++, the && and || binary operators short-circuit",is wrong for C++.)