News for hackers. Stuff that matters.
Re:Go proposal: Leave “if err != nil” alone? by dec0dedab0de on Friday June 28, 2019 @12:58PM (#20306374)
Many times I've had to say NO DONT DO THAT! to people writing giant try/except blocks in Python.

Usually the answer is to wait for an actual exception and if it's not something you could actually anticipate, then write a tiny try block that just handles the exception. The whole point being that I want it to fail if there is an unknown exception. Which in Go, you wont fail at runtime if you are just printing errors as a habit( I think, I have not done much with go).

That said, a lot of times it makes sense to return errors, and perhaps there in lies the difference between an exception and an error.

Re:Go proposal: Leave “if err != nil” alone? by superbaconman on Saturday June 29, 2019 @08:49AM (#20312289)
Massive try catch statements introduce excessive indentation, and moves the handling logic away from what's being handled. It's hard to believe that this would be common practice among anyone with a few years under the belt.