Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

go's error handling is very poor and too verbose, but go is still way less verbose than Java overall. Like any other language.

Java is the running joke of verbosity, and you are too if you seriously argue that it's not.





Coding repetitive for-loops for everything and mind-numbing error handling put everywhere makes line count bloat up like crazy. Go is one of the most verbose languages I have seen and I say this as a guy coding in Go in my daily work.

Evidence is easy - think of a problem and ask LLM to generate idiomatic examples (leverage Java streams, with functional decomposition, etc) in Go and Java and with error handling. You will find that more often than not, the Java line count is far smaller.


I also code go daily for work, and while what you say is true, it's still far less than what I remember from working with Java, which was constantly wrapping mundane crap in classes and other stuff.

Yeah, well you can write "enterprise 10k patterns crap" in any language. Java projects suffered from the craze of those initial years where every "architect" and their grandmother insisted on patterns.

Idiomatic, Modern Java is written quite differently. Today, Go has a lot of arcane, noisy, complex code too. Ex: many, many k8s Go projects.


What is an example of a modern Java open source codebase, so I can have a look?

Feel free to provide some evidence. Like really, I would be interested in examples e.g. from the Java stdlib that are significantly more verbose than another generic purpose language.

But I do know that you are meaning stuff like AbstractFactoryFactory, but you do realize that there is zero need to write anything like that and you can (and people do) write bad code in any language?


Why is the quality of discourse in this thread so low?

You started it, where's your evidence?

I can guarantee you that 9/10 times any similar Go snippet will be more verbose than Java.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: