Declined Proposal: A built-in Go error check function, “try”
1–10 of 425 posts
Re: Declined Proposal: A built-in Go error check function, “try”
#2Thank God!
Re: Declined Proposal: A built-in Go error check function, “try”
#3[deleted]
Re: Declined Proposal: A built-in Go error check function, “try”
#4Kudos 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...
Re: Declined Proposal: A built-in Go error check function, “try”
#5Great that they listened to the community
Re: Declined Proposal: A built-in Go error check function, “try”
#6Good 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”
#7Thank God!
God codes in C, and uses three space tabs.
Re: Declined Proposal: A built-in Go error check function, “try”
#8Has the idea of making the returned error implicit and handling(or discarding) of the return value mandatory been explored? Thinking on the lines of errno in C.
Re: Declined Proposal: A built-in Go error check function, “try”
#9[deleted]
Re: Declined Proposal: A built-in Go error check function, “try”
#10Kudos 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++.