4 ms·
> Now you can focus on if err return err instead. Yes that is indeed the next most-frustrating thing about Go! In the last Go language survey (https://go.dev/b
by kbd 5y ago
> Now you can focus on if err return err instead.
Yes that is indeed the next most-frustrating thing about Go! In the last Go language survey (https://go.dev/blog/survey2020-results https://go.dev/blog/survey2020-results), about 90% of people wanted generics and 60% of people want better error handling. So, one down, one to go.
Modern languages like Zig and Rust show how you can do "errors as values" way better. Zig has error returns and stack traces built in, there's no reason Go has to be so impoverished here.