I rember my first coding class in high school, in our final assignment I used "if( booleanVariable == true)" 30+ times and for the main while loop the program ran in the abomination "1==1" was the control statement.
I think it stems from those that use poor variable names to be honest. They have to have == true because their variable name is just x or something that doesn't illustrate that the variable is a boolean. So, they rely on the extra tag-along to go "oh yeah that's a boolean comparison!"
View all comments
2.9k
u/daneelthesane Feb 03 '22
I mean, even "== true" is redundant. Why not just if (isCrazyMurderingRobot)?