3 ms·
In Rust you can use the anyhow library if you want a similar level of overhead to Go and similarly aren’t worried about differentiating error cases. What do yo
by gregwebs 4y ago
In Rust you can use the anyhow library if you want a similar level of overhead to Go and similarly aren’t worried about differentiating error cases.
What do you think of adopting Zig’s error handling approaches to Go?
- klodolph 4y ago> [...] and similarly aren’t worried about differentiating error cases. I differentiate error cases in Go, so I'm not sure what you're talking about. Sometimes it's done with ==, other times it's done with type assertions, type switches, and some helper functions in the errors package. I've barely touched Zig. I think it's contributing some important ideas, and maybe those ideas will get further developed in newer languages.