The funny thing is that not C or Rust as languages “close to the hardware” have more specific bitwise operations - but Common Lisp has:
https://www.lispworks.com/documentation/HyperSpec/Body/f_logand.htm
https://www.lispworks.com/documentation/HyperSpec/Body/f_logcou.htm
https://www.lispworks.com/documentation/HyperSpec/Body/f_boole.htm#boole
(Though Rust has at least
popcnt()andcount_ones(), which are immensely useful e.g. when processing small sets.)Boolean Algebra is one of the few things I learned in electronics that I still apply in programming all the time.
!(r.SendNow || r.DryRun)requires you to read the entire statement and then negate the result. While!r.SendNow && !r.DryRuneach part of the statement stands on its own and is negated for themselves. That is how I read. I like the Ai suggestion more, because that is how I would write it myself. What I like about it is, that the negation of is right there with the variable. It gets more important, the more you divide sub-expressions in multiple lines.



