News for hackers. Stuff that matters.
Re:Isaacs: try/catch is an anti-pattern by lemming on Monday November 14, 2011 @04:04PM (#3235687)
This is not my experience at all. Return codes are far too easy to ignore. I would argue that the fact that C software works after 20 years is because it's been debugged for 20 years, everything that can possibly happen to it has probably happened and been handled. It's not because error return codes are a fundamentally better way to do this.

I know it's kind of unhip right now, but I would argue that what you're asking for is better handled using checked exceptions. That really forces you to think about error conditions, and it's enforced by the language. I'm continuously baffled by the argument that this is a bad idea.

There are no comments on this comment yet.