News for hackers. Stuff that matters.
Re:My favorite Rust function by baby on Saturday October 12, 2019 @11:14PM (#21238109)
I’m mostly working with Rust, and I really like it, and I can even understand why WRITING Golang can be frustrating at times, but it should be clear to everyone that Golang is the best language to READ.
Re:My favorite Rust function by dtn on Saturday October 12, 2019 @11:35PM (#21238193)
> it should be clear to everyone that Golang is the best language to READ

I often see Go functions with a large number of lines- many of which are noisy boilerplate error handling. Combine that with terse variable names, type inference and it's straight up tiresome to filter out the important parts. These functions aren't even doing all that much.

There is a healthy middle-ground between excessive abstraction a la Enterprise Java and what Go offers.

Re:My favorite Rust function by tsimionescu on Sunday October 13, 2019 @03:12AM (#21238913)
I completely disagree, coming from a Java and C# background.

There are nice aspects to reading Go, but any function which does some kind of error-prone operation is so hard to grok, it gets tiring - the actual purpose is constantly interrupted by 'if err := nil' so much.

And gods help you if there is some actual non-trivial error handling going on, as you've generally learned to gloss over and can easily miss that one place that actually does something with an error other than log and return.

Also, while admittedly rare, trying to review code that needs to copy structs around, if they also involve pointers or slices, is just hell.

Re:My favorite Rust function by baby on Sunday October 13, 2019 @11:19PM (#21245012)
> I completely disagree, coming from a Java

I'm sorry but I couldn't read past this.

Re:My favorite Rust function by kissgyorgy on Sunday October 13, 2019 @01:45AM (#21238587)
God no. Python is the best language to read! Go is too verbose.