MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/teqb37/static_bool_iscrazymurderingrobot_false/i0sho5b/?context=3
r/ProgrammerHumor • u/speckz • Mar 15 '22
257 comments sorted by
View all comments
Show parent comment
1
True that bool==true is ugly as hell.
but if you accidentally use = instead of == then the entire codebase is at risk any time you check a variable value. 😲Just setting a rule for bools isn't a mentionable way of increasing dependability
but there are lint rules to prevent it. https://eslint.org/docs/rules/no-cond-assign
View all comments
Show parent comment
1
u/SillAndDill Mar 15 '22 edited Mar 20 '22
True that bool==true is ugly as hell.
but if you accidentally use = instead of == then the entire codebase is at risk any time you check a variable value. 😲Just setting a rule for bools isn't a mentionable way of increasing dependability
but there are lint rules to prevent it. https://eslint.org/docs/rules/no-cond-assign