I guess the author just distrusts smaller things, leaving me to distrust the author’s larger things.
Reading "if true == false" or "if false == false", it becomes much clearer what we're testing here and I understand it instantly.
Well, assuming that the language doesn't have any quirks in this area - e.g. in Java your statements aren't equivalent for a Boolean x.
if !is_nil(foo) if (x == true)
which always seem to come with some argument how it is "more clear".I have started to ask people straight away to change to
if ((x == true) == true)
which following the same argument should be even more clear.That said, if x is data read from elsewhere that just happens to be boolean, I can write code like that in Python.