Re:Don't Use Booleans
by hardwaresofton on Tuesday July 09, 2024 @06:45AM
(#40914532)
This is a good point -- Option<T>is much better in a fn signature for comprehension. This probably clinches it.
Funnily enough, Java 1.8 is what really made me start taking Haskell and languages with better type systems more seriously -- seeing that Option actually deserved to be basically everywhere broke my frame.
Java $DAYJOB here. If I'm a caller, I probably won't realise that SomeEnum.Missing exists. I'll just see that a function accepts a SomeEnum (which I don't have) so I won't call it.