[Edu-sig] RE: Long Boolean expressions

Jeremy J. Sydik jsydik@virtualparadigm.com
Tue, 06 Jun 2000 12:23:46 -0500

Even with this consideration, I would have to disagree, ESPECIALLY if we're
looking at the pedagogical issues of educating programmers.  I agree with
your intent that > 0 makes more sense in some cases, but probably not these.
The first case is a comparison of len(str), which should ALWAYS be a
natural number.  To me, != should be used whenever the comparison is against
a singleton set (in this case 0).  In the other case, the discussion is
about numbers in Z/mod N. Again, I think we're looking at the "single"
congruence class 0 mod N, and it should IMO be remembered that -a mod N has
it's own meaning.

   I'll just toss the 0.02 in the don't jar
   Jeremy J. Sydik

John Posner wrote:
. . . 
> My one (slight) objection is your wanting to change:
>  * the comparison operation "> 0", which is firmly in the numerical realm
>  * to the comparison operation "!= 0", which is more in the logical realm
>   ("not equal to FALSE")