News for hackers. Stuff that matters.
Re:Channels in Golang by wcummings on Saturday December 24, 2016 @11:25PM (#13252917)
I'm not really a go person. I might go as far as saying I'm a go hater. But I feel compelled to defend it in this case. Golang is a deliberately simple language that lends itself well to inspection & tooling. For example, having special syntax for returning errors vs a more generic solution like multiple return values or returning a tuple. It feels awkward but makes detecting unhandled errors very simple.

Seems like there's decent enough tools + emacs/vim wrappers to me. In my mind this is one of the primary merits of go.

Re:Channels in Golang by pcwalton on Sunday December 25, 2016 @12:25AM (#13253092)
> For example, having special syntax for returning errors vs a more generic solution like multiple return values or returning a tuple.

Even if this were true (which it isn't—Go uses multiple return values for returning errors), returning a tuple would in no way make analysis harder. Detecting whether a function returns (T, err) for some T is utterly trivial.

Re:Channels in Golang by dispose13432 on Sunday December 25, 2016 @12:13AM (#13253044)
> having special syntax for returning errors vs a more generic solution like multiple return values or returning a tuple

Golang supports generic multiple returns (https://gobyexample.com/multiple-return-values). It's just much more commonly used for errors (instead of try catch).