Hacker News new | ask | show | jobs
by josefx 2288 days ago
I heard related issues called boolean blindness. You drop every bit of useful error information and leave only result/no result or true/false. Want to load a file and it fails? Access rights? Parsing Error? File doesn't exist? User interrupt? Can all be summed up as an empty Optional, completely useless for any kind of automated or manual recovery or even to decide if recovery is necessary (user interrupt).
1 comments

that is why in most languages with that approach you have a symmetric error type (Either for Haskell, Result for Rust etc.)
and in those langs its trivial and very common to make even more elaborate return/result types containing a very precise representation of all possible result categories.