Comment on I wish

<- View Parent
mryessir@lemmy.sdf.org ⁨11⁩ ⁨months⁩ ago

What statement do you flag as assumption? Yes, I do. The modulo operator is only a subset of bit masks. It is more explicit to write:

if ( (variable &EVEN_MASK) == 0) …

To act upon even numbers then:

if ( (variable %1) == 0) …

How would you name the 1 in the above statement for more expressive power?

EVEN_MODULO_OP ? That may throw more people off imo.

source
Sort:hotnewtop