I give up, I was wrong to even think about the modulo operator, you are clearly the master programmer. 🥇
This reminds me of a discussion about the ternary operator ? :
, some people think its the one true way of writing code because its just so clear what it does.
And I say please use it sparingly because if you start doing nested ternary operators its very hard to unpack what your code does, and I prefer readability over compact code, especially with today’s compilers.
kogasa@programming.dev 1 year ago
You shouldn’t rename 2 at all. “Even” has a commonly understood meaning that is instantly recognizable from
(variable %2) == 0
. The bitmask is an overgeneralization.