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-04 15:41:56 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!news.gtei.net!newsfeed.mathworks.com!btnet-peer0!btnet!news5-gui.server.ntli.net!ntli.net!news11-gui.server.ntli.net.POSTED!not-for-mail Sender: mjw@golux Newsgroups: comp.lang.ada Subject: Re: A case where Ada defaults to unsafe? References: <3C34BF2C.6030500@mail.com> <3C35675D.276C2D81@canal-plus.fr> From: Matthew Woodcraft Message-ID: <87666hlmd5.fsf@chiark.greenend.org.uk> User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: 04 Jan 2002 23:36:38 +0000 NNTP-Posting-Host: 213.107.104.73 X-Complaints-To: abuse@ntlworld.com X-Trace: news11-gui.server.ntli.net 1010187404 213.107.104.73 (Fri, 04 Jan 2002 23:36:44 GMT) NNTP-Posting-Date: Fri, 04 Jan 2002 23:36:44 GMT Organization: ntl Cablemodem News Service Xref: archiver1.google.com comp.lang.ada:18568 Date: 2002-01-04T23:36:38+00:00 List-Id: Thierry Lelegard writes: > Maybe the actual question should be "why are there two distinct > formats, with and without short-circuit?" > "and then" has an actual added value over "and" (the short-circuit). > On the other hand, what is the added value of "and"? What can be > achieved by "and" that could not be by "and then" (except side-effect, > which is a dirty practice)? One example of a side effect is raising an exception, which can make code safer. Suppose my condition is 'a = 3 and b/c = 2'. In some circumstances I would prefer to get the exception now if c is 0. -M-