Hacker News new | ask | show | jobs
by mschoebel 3767 days ago
Have you ever in real life hear someone say "If 80kg is less than your weight, then you are overweight."

Probably not. We say: "If your weight is more than 80kg then you are overweight."

When talking we are used to first mention "x", and after that the numerical value we compare it to. No matter if it's less than or larger than what we want to compare it to.

If you swap these around, then whoever listens to you - or reads your code - will take a few seconds longer to understand what you mean.

1 comments

The argument is mostly about double comparisons, i.e., checking for belonging to an interval.