News for hackers. Stuff that matters.
Re:Don't Use Booleans by mrkeen on Tuesday July 09, 2024 @06:08AM (#40914305)
> I'd like to see a strong opinion on Option<SomeEnum> versus SomeEnum containing a Missing variant.

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.

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.