It's clearer to the programmer when an integer can't be used for true
or false
.
if (5 > 0)
is easier to understand rather than if(5)
It's the same reason why they don't allow fall through conditions in switch statements. It's too easy to make a mistake.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…