Re:Go Replaces Interface{} with 'Any'
by papito on Tuesday December 14, 2021 @05:13PM
(#29558796)
People downvote it, but it's true. 2/3 of your Go code is `if err` blocks. And the way you have to chain the error messages to make the stack make any kind of sense is just maddening.
[ Parent
| on HN ]
I used to really hate that. After reading this amazing post https://middlemost.com/failure-is-your-domain I created a module that makes this bearable https://github.com/Vanclief/ez
We often have errors handled. In contrast to many Java codes just spitting unhandled exception stacktraces or crashing completely.
You must handle an exception in a language like Java. Yes, you can just print the stacktrace, but that is a choice. I don't HAVE to handle errors in Go until the program crashes as well. I never really understood that argument.