Comparing error handling in Zig and Go
Errors are values
I've been using Go for probably 8 years, and it's been my go-to language for most of the projects. I think we can all agree that Go can be verbose sometimes, which attracts some people (like me) but also is a hot topic often. Specifically when it comes to error handling, when the big portion of your codebase might be pure error handling.
What's beautiful in Go about error handling is that errors are values, this simplifies passing them around, modifying them as you want, because as Rob Pike said:
Values can be programmed, and since errors are values, errors can be programmed.
- Rob Pike -



