TL;DR: Don't mix booleans with non-booleans.
Not Declarative Code
Hard to debug
Don't mix Booleans with non-booleans.
Be Smarter than your compiler.
Stay loyal to the bijection.
Since this is a "feature" in some languages it would be hard to test. We can set programming policies or choose more strict languages.
We should detect ! !! usages in non-boolean objects and warn our programmers.
We should be very strict and keep booleans (and their behavior), far away from non booleans.
It is easier to write an incorrect program than understand a correct one.
Alan J Perlis
This article is part of the CodeSmell Series.