News for hackers. Stuff that matters.
Re:Go proposal: Leave “if err != nil” alone? by rifung on Friday June 28, 2019 @02:18PM (#20307296)
> I strongly believe in halting on error as the default response, and unwinding until the correct layer can proceed.

Isn't this is exactly what happens in Go code with the current implementation? At least all the Go code I've read seems to do this.

If you don't know what to do or can't do anything, you return the same error, preferably adding more details to the error string. If you do know what to do you handle it.

I much prefer that everyone has to make an explicit choice on what to do; I find following code with exceptions much more painful.

Re:Go proposal: Leave “if err != nil” alone? by Nullabillity on Friday June 28, 2019 @02:33PM (#20307441)
The Go default (if you don't do anything with the error value) is to just keep trucking as if nothing happened.

The community convention seems to be keep rewriting the `if err` dance, but there's nothing encouraging that in the language itself.