logoalt Hacker News

adamrtlast Tuesday at 6:22 PM1 replyview on HN

I think its more of a comment that "err != nil" is used in the vast majority of cases, so you start to treat it as noise and skim it.


Replies

9rxlast Tuesday at 6:46 PM

That reality may make the fundamental flaws of the if statement more noticeable, but at the end of the day the problem is still that the if statement itself is not great. If we're going to put in effort to improve upon it – and it is fair to say that we should – why only for a type named error?

show 1 reply