Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Based on what?

My experience using all three.

> no random swallowing

We have not been in the same codebases, apparently. The number of times I've come across (I'm paraphrasing):

    try {
        // some stuff that can fail
        // bonus points if there's a comment explaining why it can't error in practice
    } catch (Exception e) {}
Is hilarious. Especially when it happens in library code.

As verbose as `if err != nil { return nil, err }` is, the fact that it gets banged out so much means people default to it, and I find myself less likely to get into a weird partially initialized state in go than I have been in other languages.

> It’s objectively superior to grepping for an error message

Then use `errors.Is`?



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: