PHP
symfonystation
•
4 months ago
•
100%
The danger of boolean flags in object methods
sarah-savage.comDevelopers like to use booleans as flags. They're a convenient way to indicate something as on/off, true/false, yes/no. But the problem is that booleans are not clear from calling code exactly what they do. For example: Does anyone in the calling scope have any idea what the defining scope is doing? Absolutely not. The flag
Comments 0