News for hackers. Stuff that matters.
Re:Lies we tell ourselves to keep using Golang by AnimalMuppet on Friday April 29, 2022 @05:00PM (#31210543)
But people write "low-effort attempts" at exception handlers all the time. So using exceptions instead of error values doesn't actually change the situation.
Re:Lies we tell ourselves to keep using Golang by kaba0 on Friday April 29, 2022 @05:57PM (#31211039)
Defaults matter. Exceptions give me the question whether I want to worry about this piece of code here, or just go on and be reminded that it is actually important at runtime with an unmissable runtime error which has exact character number for the origin of the mistake. Even Java’s checked exceptions can be just added to the method signature.

(Ab)using Result types without good syntax for dealing with the very common case of “handle it higher up” (Rust’s ? macro is ok, not perfect but it is a much better compromise) is coming from a wrong angle imo.