News for hackers. Stuff that matters.
Re:Green vs. Brown Programming Languages by adkadskhj on Thursday April 22, 2021 @05:20PM (#26908364)
> You may not like Go's convention (indeed, I don't love it although I think it works fine in practice), but the only error handling mechanism in Go is `if err != nil { ... }`. On the other hand Rust has many. This is not incompatible with your observation of "a standardized Result type". Here is a survey of the error handling landscape circa 2019: https://blog.yoshuawuyts.com/error-handling-survey/

By this definition, Go has many too. Go has lots of libraries to wrap error types, combine errors, preserve error data, etcetc.

Errors are one of the more similar things between Rust and Go, honestly.

Re:Green vs. Brown Programming Languages by throwaway894345 on Thursday April 22, 2021 @06:07PM (#26908757)
That’s a fair point. I forgot about the various errors packages in Go. I’ve been writing more Rust lately.