News for hackers. Stuff that matters.
Re:Twelve Years of Go by Karrot_Kream on Thursday November 11, 2021 @01:25AM (#29185039)
In the first and the last case, it seems obvious to me where the error is. An obvious code smell caught in review. The second error, yeah, but lots of languages don't enforce error handling around printing to stdout, and even though Rust does in theory, in practice everyone just unwraps it and moves on with their day.
Re:Twelve Years of Go by azth on Thursday November 11, 2021 @01:47AM (#29185147)
> but lots of languages don't enforce error handling around printing to stdout

They do, they throw exceptions.

> In the first and the last case, it seems obvious to me where the error is

The last case is especially insidious. I've seen it in production several times now. Very easy to miss. Particularly when refactoring/copy pasting code (which you have to do a lot of in golang).