Personally I find throwing exceptions and expecting callers to handle more problematic.
Theoretically you can ignore err returns in Go but it forces you to think about most possibilities up front. Agreed it is verbose but as I used the language more I found it more of a blessing.
Everyone is entitled to differing opinions though.
If you want to ignore a returned err in Go, you have to specifically name it _, otherwise the compiler will yell at you for not using the variable. There are some cases where you could miss an error if you are using the same variable name for a long series of errors and checking each of them, but in general I also think it's a good system.
View all comments
Show parent comment
12
u/ddarrko Oct 24 '26
Personally I find throwing exceptions and expecting callers to handle more problematic.
Theoretically you can ignore err returns in Go but it forces you to think about most possibilities up front. Agreed it is verbose but as I used the language more I found it more of a blessing.
Everyone is entitled to differing opinions though.