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-14 09:17:29 PST Path: archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed1.earthlink.net!newsfeed.earthlink.net!newsmaster1.prod.itd.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail Message-ID: <3B50706F.D24FB0ED@acm.org> From: Jeffrey Carter X-Mailer: Mozilla 4.7 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Negative Logic (was: Re: an infinate loop) References: <3B4F2962.25BB60FF@boeing.com> <3B4F764E.DF2DB15@boeing.com> <5ee5b646.0107140600.1129f40b@posting.google.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Sat, 14 Jul 2001 16:17:03 GMT NNTP-Posting-Host: 63.180.2.190 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.prod.itd.earthlink.net 995127423 63.180.2.190 (Sat, 14 Jul 2001 09:17:03 PDT) NNTP-Posting-Date: Sat, 14 Jul 2001 09:17:03 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net X-Received-Date: Sat, 14 Jul 2001 09:14:30 PDT (newsmaster1.prod.itd.earthlink.net) Xref: archiver1.google.com comp.lang.ada:9951 Date: 2001-07-14T16:17:03+00:00 List-Id: Robert Dewar wrote: > > Jeffrey Carter wrote in message news:<3B4F764E.DF2DB15@boeing.com>... > > > Studies indicate that people understand positive logic better than > > negative logic. > > Without a reference, such an argument is simply an appeal to authority, > a well known debating technique, but not one to be paid much attention > to. Now *with* a reference, it would be an interesting contribution. I agree. Sometimes, though, one doesn't have the reference available. I recall this being mentioned in the Ada Quality and Style Guide; a quick look at AdaIC shows 5.5.4 Positive Forms of Logic guideline Avoid names and constructs that rely on the use of negatives. Choose names of flags so they represent states that can be used in positive form. example Use: if Operator_Missing then rather than either: if not Operator_Found then or: if not Operator_Missing then rationale Relational expressions can be more readable and understandable when stated in a positive form. Not exactly a reference, but perhaps a little better than proof by blatant assertion. On Google I also found http://www.seas.gwu.edu/~mfeldman/cs1book/fk3-im/chap7.html Instructor's Manual for M.B. Feldman and E.B. Koffman, Ada 95 Problem Solving and Program Design, 3rd edition. with the statement 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 ... Happy Bastille Day. -- Jeff Carter "Your mother was a hamster and your father smelt of elderberries." Monty Python & the Holy Grail