News for hackers. Stuff that matters.
Re:The Zen of Go by coldtea on Sunday February 23, 2020 @02:19PM (#22398882)
Yeah, and this is so simple a change (compiler wise) and far more stronger a guarantee I don't see why Go didn't implement it...

At least then errors as return values would be solid.

Of course now they make programmers do all the extra error wrapping thing in 1.14 to pass "richer" errors...

Re:The Zen of Go by pm90 on Sunday February 23, 2020 @03:09PM (#22399209)
Eh. It’s verbose but I like it. It makes me think about the code a bit when I have to write a descriptive error wrap. Kind of annoying I guess... I haven’t written ultra large go codebases though so ymmv.
Re:The Zen of Go by coldtea on Sunday February 23, 2020 @06:49PM (#22400423)
>It’s verbose but I like it. It makes me think about the code a bit when I have to write a descriptive error wrap.

Having the compiler force you, as is my suggestion, would make you think even more -- or not be able not to think and skip the error check or miss it.