News for hackers. Stuff that matters.
Re:Go 1.6 is Released by thebaer on Wednesday February 17, 2016 @09:45PM (#11123308)
I'm sure there are good uses for it, but I personally haven't found one yet. I mostly use Go's multiple return values to also return errors -- and that's really like using checked exceptions in Java. So whether it's a try/catch or an if statement, you have to code for these things one way or another.
Re:Go 1.6 is Released by prodigal_erik on Thursday February 18, 2016 @10:51AM (#11126581)
A try-catch block can cover many complex statements and pushes the recovery code down where you aren't forced to continually reread it. Even if it's possible to write concise Go, nobody seems to be interested in trying, it always seems to become a mess that spends 2/3 of its time on errors.
Re:Go 1.6 is Released by thebaer on Friday February 19, 2016 @05:08PM (#11137033)
¯\_(ツ)_/¯ I'm personally a fan of the style, and like explicitly seeing where the fault points in functions are, rather than having to memorize what exceptions might get thrown by what. But it can definitely cover many complex situations.

That sucks to see people making a mess with error handling code, but there are examples of good uses out there. This [0] is one I quickly found.

[0] https://github.com/schachmat/wego/blob/master/we.go