packagemain.tech

packagemain.tech

Comparing error handling in Zig and Go

Alex Pliutau's avatar
Alex Pliutau
Apr 28, 2025
∙ Paid

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 -

User's avatar

Continue reading this post for free, courtesy of Alex Pliutau.

Or purchase a paid subscription.
© 2026 Aliaksandr Pliutau · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture