DEV Community

Haskell - Boolean Blindness == True

Ken Aguilar on April 16, 2020

What does the title even mean? True? for what? Good? Bad? Useful? If it was False, would we see any meaning? Even the state of a light bulb cannot...
Collapse
 
tfausak profile image
Taylor Fausak

Well said! I'm convinced that booleans should almost never be used. An explicit type makes things both easier to understand and harder to misuse.

Collapse
 
shimmer profile image
Brian Berns

Would True mean the light is on? or would it mean off?

Hmm, can't say I agree with this one. I'm pretty sure all reasonable people would agree that True = On.