3 ms·
> I don't know about you, but "week is greater than 2180" sounds more natural than "2180 is less than week" To you perhaps. To me, I think "if I put both sides
by inetknght 5y ago
> I don't know about you, but "week is greater than 2180" sounds more natural than "2180 is less than week"
To you perhaps. To me, I think "if I put both sides on the number line, which way is being questioned? and is that question answered true or false?"
And therefore I almost always do an equals or less-than comparison because that's how I think about the number line: 0 in the center with negatives on the left and positives on the right.
So `if (week < 2048)` is just as valid and easy to think about as `if (!(2048 <= week))`. But then `if (!(2048 <= week))` provides an additional guarantee: that I won't accidentally assign to `week`.
- deleted 5y ago[deleted]