if$.%100==0 is shorter and clearer than unless$.%100
I believe it's a matter of taste. My (maybe weird) way of thinking is that I'm interested in $a % $b when the modulo operator yields a false value, in the same way that I'm interested in $a == $b when the result is true. So, the alternatives are:
if $a % $b == 0 if !($a % $b) if not $a % $b unless $a % $b
To me, the clearest of them is the last one. Maybe it's because I use it regularly. Note that the one you said was shorter and clearer is the longest of that four, once we beautify the code.
--
David Serrano
In reply to Re^3: Reading Text Lines
by Hue-Bond
in thread Reading Text Lines
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |