|
|
|
|
|
by wespiser_2018
2131 days ago
|
|
I work at a Haskell shop, and the overuse 'boolean blindness' issue has come up. The common understanding is that booleans are fine to use when the problem calls for it, just don't don't be afraid to use a more expressive data structure if that could make the code concise or understandable. I think the real "boolean blindless" is something that happens in beginners, who don't yet understand that ADTs can be a rich modeling language, and instead use (Bool, Bool, Bool, Bool) when some combination of product and sum types is better. |
|