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=0.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_FROM_MSSP 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-04 07:58:02 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!feeder.qis.net!feed2.onemain.com!feed1.onemain.com!out.nntp.be!propagator-SanJose!in.nntp.be!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison References: <3C34BF2C.6030500@mail.com> <3C34D252.4070307@mail.com> Subject: Re: A case where Ada defaults to unsafe? Message-ID: <9ikZ7.3891$cD4.6694@www.newsranger.com> X-Abuse-Info: When contacting newsranger.com regarding abuse please X-Abuse-Info: forward the entire news article including headers or X-Abuse-Info: else we will not be able to process your request X-Complaints-To: abuse@newsranger.com NNTP-Posting-Date: Fri, 04 Jan 2002 10:57:57 EST Organization: http://www.newsranger.com Date: Fri, 04 Jan 2002 15:57:57 GMT Xref: archiver1.google.com comp.lang.ada:18532 Date: 2002-01-04T15:57:57+00:00 List-Id: In article , Robert A Duff says... > >Hyman Rosen writes: > >> 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"? > >I think an expression where the right-hand side is meaningful only if >the left-hand side is True is "special" and should be marked as such >("and then"). A more usual expression, where the two halves of "and" >are symmetric, doesn't deserve the "extra" notation. I guess I'm >arguing from a readability point of view, rather than safety per se. >But readability promotes safety in general. Right. For example, suppose we "fix" things so that all boolean ops short-circuit. Now there's no way for a reader to tell the difference between boolean ops that are ordered the way they are for safety, or just accidentally. But the most common occurance is always going to be the latter. So when Joe Maintainence comes in and adds a condition to an "if" statement (as is *very* common), he is now much more likely to screw up the code, since he can't tell by just looking at it if the order of the existing conditions is important. --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced.