News for hackers. Stuff that matters.
Re:Why I love Go by geodel on Tuesday December 05, 2017 @07:09PM (#15857412)
Nothing ridiculous about it. I work on a Java code base where there is try catch every 4-5 lines. The application is working fine and nobody is unduly worried about fine taste in exception handling. If application were in Go it would have err != nil every few line that would also be fine for us.

With all the things that you mention Go does not offer helps it keep simple. It has already proven much useful for many of of my projects where a 'better' language would fail for variety of reasons.

Re:Why I love Go by hota_mazi on Tuesday December 05, 2017 @07:13PM (#15857430)
> I work on a Java code base where there is try catch every 4-5 lines.

There is a huge difference.

The Java code you are reading is caused by bad programmers who are not using exception handling correctly. Proper exception use means sometimes catching and sometimes ignoring the exception and declaring it in your `throws` clause.

In Go, testing against `nil` every twenty lines is not only common, it's the ONLY way to write robust code. You simply don't have a choice.

Re:Why I love Go by geodel on Tuesday December 05, 2017 @07:30PM (#15857517)
Considering so many projects in last 10 years where code was not even formatted even though it was one command away in IDE, ridiculous variable names, useless comments like 'method getA() returns A" I am not sure it is result of bad programmers or just natural state of IT industry. Java succeeds despite lot of bad code mean immense hard work on performance/ libs side by JDK teams.

I think same is going to be true for Go. I have written few projects in Go and they have produced much more value than time taken to write them.

At the end of day companies I worked for prefer mediocre code that is written and used vs excellent code in brilliant programing language that was never completed.

Re:Why I love Go by e3b0c on Wednesday December 06, 2017 @12:41AM (#15858816)
Interestingly it makes me a better programmer after being used to the Go style. Now I don't allow unused headers/variables in my C/C++ code and feel natural to check every return error. 'Optional' warnings don't happen anymore either since -Werror feels familiar. Overall my C/C++ code becomes more reliable and easier to debug.