Hacker News new | ask | show | jobs
by jgrant27 1710 days ago

    Have you debugged.it ?
Debugging seems to be the author's coding philosophy which says it all.

    While I had over a decade of experience in other languages, such as Python, PHP, Java, etc. 
    I found it extremely difficult to wrap my head around Go.
This could be because the author's introduction to programming and most of their experience has been with some very problematic languages.

Maybe it's not Go that is a terrible language but just that the author is not a systems programmer who has worked with large code bases ?

3 comments

No, it doesn't get any better when the codebase is bigger. The way to figure out WTF went wrong in a large code base written in Go is:

1. Take the line number where the error was logged, likely somewhere very close to e.g. the main event handling loop, and completely disconnected from the place where the error was initially thrown. There is no stack trace.

2. Try to figure out which parts of the error string are constant (i.e. searchable), and pray for the developer to have been familiar with the issue so that the string is globally unique (corollary: When writing Go, make sure your error strings are unique, introduce some form of variation if you're throwing similar errors, even if it's just punctuation or synonyms, to make sure the throw site is identifiable).

3. Try to guess what the flow between those two sites could have been.

The lack of proper stack traces (or even the line number where the error was thrown) on errors is one of the most insane effects of this error handling approach. (The other is hard to read code because the actual logic is hidden in 3x as much error handling boilerplate).

I’m not sure if I buy that. Did you read the article? The author is expressing explicitly what’s wrong in many areas and why they’re useful. I don’t like rebuttals like this because it then becomes a self-fulfilling prophecy of Go-lovers avoiding criticism from outside because “They won’t get it due to their background”. Great, now we’ve just created an echo-chamber. It’s good to get outside perspective and debate. I’m sure many Go experts would like to understand where they could improve - without losing Go’s core minimalism.

Author’s tone could be better but they’re just being straightforward that they don’t like Go and specifically why. Totally ok in my view.

I think this criticism is very unfair, if there is one thing java is (in)famous for, its large codebases. Kafka is written in it. I myself don't use it, but you need to substantiate your argument.

Is there any reason you believe python and java are 'very problematic"? Isnt every language promlematic in its own way? Are they more problematic than C, which breeds foodguns, or what are we comparing to?