MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/hefap9/val_is_a_boolean_value/fvsfnlj/?context=3
r/badcode • u/Bluebearsuper • Jun 23 '20
58 comments sorted by
View all comments
13
Nothing wrong as long as you remember that it’s boolean, it would be a lot easier to judge how bad this is if the rest of the code was there
4 u/MathSciElec Jun 23 '20 Nothing wrong? There’s an unnecessary comparison, and I doubt the function itself is even necessary...
4
Nothing wrong? There’s an unnecessary comparison, and I doubt the function itself is even necessary...
13
u/Nick433333 Jun 23 '20
Nothing wrong as long as you remember that it’s boolean, it would be a lot easier to judge how bad this is if the rest of the code was there