Re:An Open Letter to the Go Team About Try
by pixelrevision on Tuesday July 02, 2019 @09:41PM
(#20340896)
I really think how you are using the language had a large effect on how you are going to view all this. If you are building a commandline utility then the way go deals with errors is great you just panic and send back a message. If you are building a long running web service you want a whole lot more info to go into your logs for when things go wrong. I dunno what the solution is but try/catch doesn’t seem to be the right thing to focus on.
[ Parent
| on HN ]
Despite the name, there's really nothing in common with try/catch. It's just sugar for if err != nil { return }.
Re:An Open Letter to the Go Team About Try
by pfarnsworth on Wednesday July 03, 2019 @02:09AM
(#20342015)
Try is a terrible choice for a name exactly because of try/catch, I don't know why they decided on that.