2 ms·
I agree it this needs to happen. Right now about all you can do is snippet your way through it, it is an incredibly common scenario that go handles really poorl
by PaulKeeble 6y ago
I agree it this needs to happen. Right now about all you can do is snippet your way through it, it is an incredibly common scenario that go handles really poorly.
Java's Checked Exceptions was less invasive and API polluting than this is because at least it didn't get in the way of these types of calls where the error should just shortcut. More importantly in Java you could hide the errors behind a generic RuntimeException if from that point up there was nothing anything could do but generically deal with the error. Panic/Recover is similar but very discouraged for this sort of usage pattern.