by bakhy · 11y ago · 0 comments
sorry to rub it in, but Java needs value types. this whole issue, however maybe irrelevant, does not exist in C#.
Yes, it's not ideal, it's still a flaw that should be caught at compile-time, but it's not a big real-world problem, as returning null by accident instead of an option is a pretty rare bug.
The much more common bug (you didn't realize no return value was a case), the Option is a good counter to.
No, it's not a perfect solution, but it's not useless either.