Live data from Hacker News

Declined Proposal: A built-in Go error check function, “try”

github.com

1–10 of 425 posts

Re: Declined Proposal: A built-in Go error check function, “try”

#6
Good on the Go Team listening to the community, I definitely saw more people against this feature than for it.

I hope they take another stab at improving error handling. I like Go a lot and do think error handling is one place it could use improvements.

Re: Declined Proposal: A built-in Go error check function, “try”

#10
post #4

Kudos to the Go team for their process on this. IMHO it's worth reading Russ Cox's explanation of the problem area, including examples, and comparisons to other languages e.g. Rust and Swift. https://go.googlesource.com/proposal/+/master/design/go2draf...

"But Rust has no equivalent of handle: the convenience of the ? operator comes with the likely omission of proper handling." what's that supposed to mean? The ? operator just bails out if an Error result is returned from the called function, and forwards that Error to the caller. Cleanup is performed implicitly by drop implementations (destructors) using the RAII pattern ala C++.
Post reply on HN