If you're going to opt for
if(foo == true)
why not go all the way and do
if(foo == true == true == true == true == true == true == true == true == true)
Which is the same thing.
I disagree that if its clearly named (ie: IsSomething
) then its ok to not compare to true, but otherwise you should. If its in an if statement obviously it can be compared to true.
if(monday)
Is just as descriptive as
if(monday == true)
I also prefer the same standard for not:
if(!monday)
as opposed to
if(monday == false)