Y
Hacker News
new
|
ask
|
show
|
jobs
by
95th
2173 days ago
Well, in Java's defense, at least you don't forget to check the error like you could in Go.
1 comments
cy_hauser
2173 days ago
While I'm no great fan of Go's error handling, I've not found this to be an issue. The compiler yells at you if you forget. You'd have to explicitly ignore the error by underscoring it to "forget" it.
link
apta
2173 days ago
No it doesn't:
err := foo() if err != nil {...} err = bar() // accidentally ignored err = baz() if err != nil {...}
link