3 ms·
Exactly -- I get annoyed by having to write 20 `if err != nil {`s when just one `catch` in another language would work. IMO, this is one instance of Go's mainta
by seandougall 10y ago
Exactly -- I get annoyed by having to write 20 `if err != nil {`s when just one `catch` in another language would work. IMO, this is one instance of Go's maintainers conflating language simplicity with compiler simplicity.
- spriggan3 10y ago> IMO, this is one instance of Go's maintainers conflating language simplicity with compiler simplicity. Lol, I thought a long time about how I could express that feeling. now I understand, in Go the developer is doing the compiler's work ...
- regecks 10y agoPerhaps the sentiment is valid, but practically speaking, in Rust you do even more of the compiler's work for it, no? I suppose one could just cherry-pick an analogue of the `try!` macro into Go.
- mayhew 10y agoAgreed, Rust's way of error handling with Result and try! (or ?) is far superior.