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,88858d66e427dbcb X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-06 15:19:22 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!freenix!skynet.be!skynet.be!130.227.3.83.MISMATCH!newsfeed1.uni2.dk!news.get2net.dk.POSTED!53ab2750!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Short circuit boolean evaluation References: <87f5a614.0311051528.30450c7a@posting.google.com> <87f5a614.0311061144.360b3325@posting.google.com> From: Mark Lorenzen Message-ID: User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.2 (gnu/linux) Cancel-Lock: sha1:Jjs0r6XLFsgJskghY9dflE6J2vo= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Fri, 07 Nov 2003 01:26:12 +0100 NNTP-Posting-Host: 62.84.221.216 X-Complaints-To: abuse@colt-telecom.dk X-Trace: news.get2net.dk 1068160758 62.84.221.216 (Fri, 07 Nov 2003 00:19:18 CET) NNTP-Posting-Date: Fri, 07 Nov 2003 00:19:18 CET Organization: Colt Telecom Kunde Xref: archiver1.google.com comp.lang.ada:2174 Date: 2003-11-07T01:26:12+01:00 List-Id: svaa@ciberpiula.net (svaa) writes: > "Steve" wrote in message news:... >> I consider it unimaginable to make such a fundamental change to a language >> in order to save a few keystrokes when more than a few billion lines of >> source code might be effected. > > I wouldn't call it a few keystrokes, I use it in every condition. > > Anyhow, that's not the problem, the problem is that short-circuit has > clearly proved to be better, I supose that the idea of Ada0x is to add > new features and remove flaws. Backward compatibility is a problem, > but it could be resolved with pragmas etc. Most sofware have eventualy > made changes that had backward compatibility problems. Probably a big > problem with backward compatibility means a big improvent for future > developments. Has clearly proved to be better? Where do you get that idea from? > > Sure we can live with full evaluation, but we can live better with > short circuit. If we accept that short circuit is better than full > evaluation, the change must be done, sooner or later. This time is as > good or bad as any another. Why should we accept that? > > Perhaps Ada0x could let the full evaluation as default, but add a > pragma that allows short circuit, and in ada1x make it as default. (it > doesn't means make illegal "and then" operator). Ada has fame of > bloated and burden syntax, things like this doesn't help. I think it > is time and make good changes, even if they are deep. It's not time to > be conservative, but brave. > > Will we carry "and then" in ada5x? Will we accept that flaw (a minor > flaw, but a flaw) in the first version must remain for ever?. Why is it that every time someone complaints about the difference between Ada and other languages, that it is Ada that is flawed? Please explain why you want to use: if (Alarm_Is_On and then Operator_Is_Alerted) then Wait_For_Operator; else Call_Fire_Brigade; end if; instead of: if (Alarm_Is_On and Operator_Is_Alerted) then Wait_For_Operator; else Call_Fire_Brigade; end if; By using the first version you explicitly explain to the reader that there is something fishy going on when evaluating Operator_Is_Alerted, since it may only be evaluated if Alarm_Is_On evaluates to true. Is there something fishy going on, or are you just giving the reader superfluous information, that may confuse him when he has to maintain the code in 10 years time? - Mark Lorenzen