Code Smell 07 - Boolean Variables
22 September, 2022
5
5
0
Contributors
TL;DR: Don't use boolean variables, they force you to write Ifs. Create polymorfic states instead.
Problems
•
Extensibility
•
Comparison in some languages
Solutions
•
Examples
•
Sample Code
Wrong
Right
Detection
Exceptions
•
Relations
Tags
•
Declarative
•
Primitive
More info
Conclusion
Also Known as
•
Credits
refactoring
code
cleancode
smells