Hacker News new | ask | show | jobs
by setr 26 days ago
I mean, they have to explicitly unpack the error and then choose to do nothing with it. It requires roughly the same amount of code to do the same with discarding an exception.

Except with a Result type the fact that an exception can occur and should be handled in the first place is explicit.

The problem if anything is that you MUST say something about the error case, despite the common scenario being “pass it forward” — the same reason exception do this by default. Which is also why rust for example special cases Result with the ? operator to do exactly that