|
|
|
|
|
by _ph_
3219 days ago
|
|
I was mostly thinking of Java. Ignoring an exception would be done with try {....} catch (Exception e) {}, while in Go, you would do: x,_ := f(...). And if you want to check a returned error I think the if err!=nil {...} is still a bit less typing than the Java version, and you don't have to declare checked exceptions you might throw. |
|
Ignoring an error is almost always a serious mistake, so the fact that Go makes it easy and not blatant is not a good thing.