Err = Nil Sucks (Or Does It)
youtube.com
Err = Nil Sucks (Or Does It)
1–3 of 3 posts
Re: Err = Nil Sucks (Or Does It)
#2I also think most of the criticism of Go error handling is that it's a clunky and noisy implementation of the "error values" idea. Rust does the same, but instead of a (value, error) tuple they use enums that clearly discriminate between the two, and aren't afraid of providing more concise syntax for the common 're-throw' case.
Re: Err = Nil Sucks (Or Does It)
#3This feels a bit strawmanny. "If you're doing err=nil in typescript, it sucks worse than Go!" Yeah, but nobody does err=nil in typescript, you just re-throw or something similar. At least that's what happens in Python land, which I'm more familiar with and also uses exceptions for error handling. I also think most of the criticism of Go error handling is that it's a clunky and noisy implementation of the "error value…