The error handling stuff more than lack of generics is my single biggest beef with the language. It is basically C-style error handling from the 80s all over again, only you return error codes as a separate multi-return value.
The Maybe monad style is so much cleaner, it also allows Elvis operator-like changing, e.g.
The Maybe monad style is so much cleaner, it also allows Elvis operator-like changing, e.g.
foo().getOrElse(blah).getOrElse(baz)