From: Jeffrey Carter <jrcarter@acm.org>
Subject: Negative Logic (was: Re: an infinate loop)
Date: Sat, 14 Jul 2001 16:17:03 GMT
Date: 2001-07-14T16:17:03+00:00 [thread overview]
Message-ID: <3B50706F.D24FB0ED@acm.org> (raw)
In-Reply-To: 5ee5b646.0107140600.1129f40b@posting.google.com
Robert Dewar wrote:
>
> Jeffrey Carter <jeffrey.carter@boeing.com> 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
next prev parent reply other threads:[~2001-07-14 16:17 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-12 21:43 an infinate loop Beau
2001-07-13 3:21 ` DuckE
2001-07-13 13:57 ` Ted Dennison
2001-07-13 17:01 ` Jeffrey Carter
2001-07-13 18:11 ` Ted Dennison
2001-07-13 22:26 ` Jeffrey Carter
2001-07-16 15:14 ` Marin David Condic
2001-07-17 17:02 ` Matthias Kretschmer
2001-07-17 17:56 ` Marin David Condic
2001-07-17 19:25 ` Ted Dennison
2001-07-19 11:38 ` Matthias Kretschmer
2001-07-19 14:28 ` Ted Dennison
2001-07-17 17:13 ` Warren W. Gay VE3WWG
2001-07-14 23:41 ` Darren New
2001-07-16 13:24 ` Ted Dennison
2001-07-16 15:19 ` Marin David Condic
2001-07-13 20:40 ` chris.danx
2001-07-13 22:29 ` Jeffrey Carter
2001-07-14 14:00 ` Robert Dewar
2001-07-14 16:17 ` Jeffrey Carter [this message]
2001-07-17 4:06 ` Negative Logic (was: Re: an infinate loop) Robert Dewar
2001-07-17 4:23 ` Robert Dewar
2001-07-16 9:26 ` an infinate loop Philip Anderson
2001-07-19 9:32 ` an infinite [was: infinate] loop AG
2001-07-15 21:18 ` an infinate loop Matthias Kretschmer
2001-07-16 21:59 ` Stephen Leake
2001-07-13 16:48 ` C. Bauman
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox