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,cf677878aa77e0d8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-16 21:23:53 PST Path: archiver1.google.com!newsfeed.google.com!postnews1.google.com!not-for-mail From: dewar@gnat.com (Robert Dewar) Newsgroups: comp.lang.ada Subject: Re: Negative Logic (was: Re: an infinate loop) Date: 16 Jul 2001 21:23:52 -0700 Organization: http://groups.google.com/ Message-ID: <5ee5b646.0107162023.47537c6d@posting.google.com> References: <3B4F2962.25BB60FF@boeing.com> <3B4F764E.DF2DB15@boeing.com> <5ee5b646.0107140600.1129f40b@posting.google.com> <3B50706F.D24FB0ED@acm.org> NNTP-Posting-Host: 208.224.77.203 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 995343833 1702 127.0.0.1 (17 Jul 2001 04:23:53 GMT) X-Complaints-To: groups-support@google.com NNTP-Posting-Date: 17 Jul 2001 04:23:53 GMT Xref: archiver1.google.com comp.lang.ada:10042 Date: 2001-07-17T04:23:53+00:00 List-Id: Jeffrey Carter wrote in message news:<3B50706F.D24FB0ED@acm.org>... > The material on loops other than FOR loops is heavily revised in this > edition, to present general loops before WHILE loops. This reflects > the observation that beginners deal more naturally with "positive > logic" stating a positive condition to exit a loop ... Note that I agree that *other things being equal* conditions which have a NOT are more complicated to understand than those that don't (any extra operator adds complexity, other things being equal). The trouble is that things are typically NOT equal, and what worries me about a rule like this is it will cause people to recast their conditions, using Demorgan's laws or whatever, to desparately avoid a NOT, resulting in something more complex. Sort of like the situation where convoluted boolean flags are added in a desparate attempt to avoid a goto that would be the most natural way of writing the code, e.g. to reflect a loop continue statement in a language (like Ada :-) with no continue statement in loops. Of course AQ&S is just intended to be guidelines anyway, but I far too often see people turning these AQ&S guidelines into rules :-(