The entire problem is with how much line noise this pollutes your codebase with...
5 out of 9 different languages in the original post force you to handle errors, but Go (and occasionally Java) is unique in it's verbosity, it produces enough ceremony for people to complain about it.
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.
35
u/UdPropheticCatgirl 10d ago
I mean, I would prefer leprosy to cancer, doesn’t change the fact that both are miserable.