Name: Anonymous 2019-01-08 15:02
Null is a mistake only if you're severely retarded
What do you mean by that? A null type? Something like bottom or unit?null is already a bottom type. the point is for it not to be one - so that the compiler will complain if you try to use it as a value
Functions that return pairs? How would that help?it's not the best approach because it ends up being verbose, but think of it like go-style error handling applied to nulls: if a function doesn't return what it usually returns, it returns an error value indicating that the normal return didn't happen.
So, like Maybe in haskell?yes.
Maybe
in haskal, std::optional<>
in sepples, Optional<>
in Java etc.