News for hackers. Stuff that matters.
Re:You’re better off using Exceptions by UK-Al05 on Monday February 03, 2020 @12:26PM (#22226404)
> Exceptions are a hell of a lot better than littering your code with null checks or error code checks, especially when you forget one and get a null pointer error or your code wanders away from the root cause and fails later.

That's basically limitation of the language. Null checks and result checking can basically be abstracted away with non-nullable types, option types, and result types and bind.

You only need to do match or check right at the edge, so they're not everywhere.

Re:You’re better off using Exceptions by joshuamorton on Monday February 03, 2020 @02:03PM (#22227666)
Result types are exceptions with different performance characteristics.

Like, handling a checked exception (Java) and a Google-cpp StatusOr<T> or a rust Result<T> provide extraordinary similar code. Unchecked exceptions provide a bit of extra dynamism, and languages without either are anti-user.

Re:You’re better off using Exceptions by UK-Al05 on Monday February 03, 2020 @02:32PM (#22228013)
I find result and option types compose nicer using monadic style composition.