comp.lang.ada
 help / color / mirror / Atom feed
From: dewar@gnat.com (Robert Dewar)
Subject: Re: Negative Logic (was: Re: an infinate loop)
Date: 16 Jul 2001 21:23:52 -0700
Date: 2001-07-17T04:23:53+00:00	[thread overview]
Message-ID: <5ee5b646.0107162023.47537c6d@posting.google.com> (raw)
In-Reply-To: 3B50706F.D24FB0ED@acm.org

Jeffrey Carter <jrcarter@acm.org> 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 :-(



  parent reply	other threads:[~2001-07-17  4:23 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           ` Negative Logic (was: Re: an infinate loop) Jeffrey Carter
2001-07-17  4:06             ` Robert Dewar
2001-07-17  4:23             ` Robert Dewar [this message]
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