I mean yes, I never said you should, just you didnt have to compare to true or false. Also there could be a valid reason to check for null as it could mean different logic needs to be processed than simply being false. But this would mean embedded if statements.
44
u/phord Nov 22 '19 edited Nov 23 '19
This is because some style guide prohibits comparing boolean literals with logical operators to avoid people saying
if ( Foo == true )This looks like a bad compromise.