Hacker News new | ask | show | jobs
by throwawaymaths 197 days ago
run code anywhere hamstrung by 90s syntax and hidden code indirections
1 comments

Haven’t checked in on Java in a while?
From what I gather everyone is still stuck on Java 8 so no need to check?
Even stuck on Java 8 it's less verbose than Go, which everyone seems to love.

But the majority of projects are on a newer JDK than 8 for quite some years now.

Not even latest Java is less verbose than Go.
Are we talking about the language that has a couple extra lines after every statement, disguising as error handling?
Go only looks like that in toy examples where you have one method calling a bunch of libraries and services. If you are writing actual logic, the error handling is preferable to exceptions IMO, because no project even uses them correctly.

Now if you complain about slice handling, I'm with you.

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.

Before go had generics it was pretty common to have multiple implementations of the same thing just for different datatypes.
Where do you gather this from? We are a startup, on Java and on 25.
Why didn't you choose something more modern/sensible. go/kotlin/anything else on the planet?
Go is more verbose than Java though, in what way would it be more sensible?

Also, Java's ecosystem is unparalleled (top 3 in size, depending on domain it usually has the best packages (e.g. typical backend-related functionality)), has stellar performance, a huge developer base, best-in-class IDE support, even LLMs understand it exceptionally well (given how widely represented it is in the training corpus, plus has a decent type system) if that's your thing.

For a typical backend system, you really have to have a good reason to choose something else at this point.

Java is ok for typical backend stuff, but Go doesn't hide things the way Java does. With Go, you actually learn what's going on, while with Java, you just learn your way around the various frameworks. As a programmer, I don't want that That said, my current company uses Spring Boot. It does its job, but it wouldn't be my top choice.
Except for Kotlin, which is a much nicer language to deal with.
While kotlin is somewhat nicer, it is not making a huge difference compared to java25. Like the sibling said, go is as verbose , the JVM is unparalleled still.

Why wouldn't I choose java

Golang has a way smaller memory footprint on average.

I left a place using Java to run edge apps and the footprint was a major issue.

Kotlin sensible? It plays catchup game with newest JDKs.
No, everyone isn’t. You really should check.
This is absolutely untrue. Code from JDK 8 runs fine on JDK 25 (just released LTS). It is true that if you did something silly that locks you into certain dependency versions, you may be stuck, but this is not the majority of applications.
I tried to check in on Java recently but got a NullPointerException when using the AbstractSingletonProxyFactoryBean !
R/ProgrammerHumor quality comment here.
I'll never understand people making fun of verbosity. So you really prefer short, ambiguous, opaque and unpronounceable abbreviations? Really?!
For me at least, I find it easier to see the shape of algorithms, control flow, and expressions when the variable names are concise. But this also might be because I have found Go to fit my use-cases and thinking style well, and Go programs tend to follow this naming convention.

For example, if I have a struct `PageEntity` with a field `Id`, and I am iterating over a slice of such IDs, I would prefer using `pid` instead of `pageEntityId` as the variable name. But Java APIs and conventions tend to use these longer names, so I find it takes more thinking to remember the different names instead of quickly seeing the behavior of code at a glance.

Java also tends to have a lot of inheritance which results in these long glued-together names and makes it harder to follow program flow because behaviors get introduced in multiple different places (i.e., it has the opposite of locality of behavior).

But those are just my opinions and experiences! I know many people love Java, and it is a versatile and powerful language.

That's really funny that you complain about complexity and then use Go which is a significantly more verbose language...
The irony is that the same bunch of folks will complain about array languages.
i haven't. do people still use the "class" keyword?
Is that the issue people have with Java?