News for hackers. Stuff that matters.
Re:The Zen of Go by apta on Sunday February 23, 2020 @09:21AM (#22396930)
> a protection that, until now, had to be enforced merely by convention and review.

It is enforced by linters and almost all IDEs. Compare to how how the following golang code drops errors silently, and is not caught by the compiler:

    foo, err := getFoo()
    err = processFoo(foo)
    if err != nil { ... }
Re:The Zen of Go by hactually on Sunday February 23, 2020 @02:46PM (#22399064)
Wait... what are you expecting here?
Re:The Zen of Go by pm90 on Sunday February 23, 2020 @03:11PM (#22399221)
The first error is not “handled” but is overwritten
Re:The Zen of Go by masklinn on Sunday February 23, 2020 @04:46PM (#22399762)
A compilation error, the first `err` is never used.