4 ms·
Yeah I have to agree that the Go-style error handling does actually lead to better code. At least when I write it. It makes me think through how I am going to h
by dinkleberg 3y ago
Yeah I have to agree that the Go-style error handling does actually lead to better code. At least when I write it. It makes me think through how I am going to handle error states rather than chucking it in try/except in Python and hoping nothing breaks lol.
- deleted 3y ago[deleted]
- jen20 3y agoRust-style error handling works better though - similar to Go, but with the addition of enums such that the precise types of errors which may be encountered can be easily documented in the type system.
- dinkleberg 3y agoAgreed, I’d love if they would take inspiration from Rust and bring that to Go.
- jen20 3y agoYes - if Go had sum types (and they were idiomatically used in the standard library), it would take it from a pretty good platform to a first class one. The library ecosystem is already excellent, and the tooling is good, lack of sum types is the single wart that makes me regret it every time I pick Go up for a project.