0:00 / 0:00
Comparing error handling in Zig and Go
package main
21K subscribers • 2 videos on Hallway
- Recommended by 1 person: 1 in engineering communities.
- Linked in the descriptionplutov/packagemain
Beginner. No background in the topic needed.
8.2K views1 year ago1 recommendation
How error handling works in Go and Zig, comparing Go's errors-as-values approach with Zig's error unions and keywords.
There are different approaches to handle errors and every language does it differently. I personally find that both Go and Zig have the best error handling compared to other languages, that's the reason why I wanted to make this video and give you a tiny taste of Zig's error handling. Code: github.com/plutov/packagemain/tree/master/zig-go-errors Errors are values: go.dev/blog/errors-are-values Errors in Zig 1: ziglang.org/documentation/master/#errors Errors in Zig 2: zig.guide/language-basics/errors/ TIMESTAMPS: - intro - errors in Go - few notes on Zig - try keyword - catch keyword - fallback return - named block - if-else-switch - catch unreachable - contextual errors in Go - conclusionWhy it's here
1 person recommends thisWhat people say. Recommended as a comparison of error handling paradigms between Go and Zig.
u/der_gopherin r/ProgrammingLanguages • Recommends
Comparing error handling in Zig and Go
I love error handling in both languages Go and Zig. Rust has a good one too. What language do you think does it best?
u/der_gopherin r/ProgrammingLanguages • Recommends
Comparing error handling in Zig and Go