logoalt Hacker News

thaynelast Wednesday at 10:24 PM0 repliesview on HN

Is it 3x as important? Because currently, for a single line of happy path code you often have 3 lines of error handling code.

And while handling errors is important, it is also often trivial, just optionally wrapping the error and returning it up to the caller. I agree it is good for that to be explicit, but I don't think it needs to take up more space than the actual function call.

In my experience, the important error handling code is either at the lowest layer, where the error initiall occurs, or at the top level, where the error is reported to the user. Mid level code usually just propagates errors upwards.