12 ms·
> Use enums For internal but not external APIs. Enums create tight coupling and are not extensible. Booleans and Enums should be avoided for external APIs.
by ExpiredLink 11y ago
> Use enums
For internal but not external APIs. Enums create tight coupling and are not extensible. Booleans and Enums should be avoided for external APIs.
- fyolnish 11y agoWhat are you talking about? How is using an enum more tightly coupled/less extensible than a function name?
- lclarkmichalek 11y agoI usually don't care if my booleans are extensible or not.
- twic 11y agoWell that's just a lack of ambition on your part: http://thedailywtf.com/articles/What_Is_Truth_0x3f_ http://thedailywtf.com/articles/What_Is_Truth_0x3f_
- twic 11y agoOh man, i should not have started reading DailyWTF. When booleans attack: http://thedailywtf.com/articles/tri-state-boolean http://thedailywtf.com/articles/tri-state-boolean http://thedailywtf.com/articles/Special-Delivery http://thedailywtf.com/articles/Special-Delivery