Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> It's not easy to forget error handling in Go.

It's very easy to do so if the function has no useful return value or you don't care for it e.g. Writer.Write: https://play.golang.org/p/cPh0PJoz-v

> And letting exceptions bubble up all the way will improve things how?

Errors the developer forgets (or does not want) to handle will trigger a default handler.



In practice, what you end up doing is adding the `errcheck` linter to your build process and it finds all instances of you not dealing with an error return and it's "just-as-good" as a compile time check.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: