r/Backend • • Oct 16 '26

Modern Java for startups

Unfortunately, I see that Java is disappearing from startup companies. Java used to have an image of an obsolete backend language with performance problems, too verbose and unfriendly to deveopers. It was pretty true to older Java versions and I could understand why startups decided to pick other backend languages

If you look at Java 25, it's an absolutely different story.

Performance wise - it has virtual threads, which makes concurrency extremely high. Virtual threads are Java's answer to goroutines in Golang, and they enable to run thousands of I/O requests concurrently. Java's execution speed is pretty fast (more than Python and node.js).

As for container size - it's huge as long as you work with Spring. However, Java has many other much more lightweight frameworks like Micronaut, Quarkus and Javalin which reduces the container size to be on par with node.js and Python.

It's a real static typing which keeps code safety and improve readability. Unlike Golang, Java has inheritance, ploymorphism and explicit interface (let alone speaking about error handling).

It has a huge talent pool (almost everybody learned Java at a certain point).

As for verbosity and developer experience - Java has been improved a lot in this field. It has records (no need for getters setters, equals and hash), unnamed class (no need to write "public static void main" everytime you start a new program) and dozens of libraries and other tools.

If so, why are startups still stay away from Java and stick to Python/node.js/Golang?

72 Upvotes

75 comments sorted by

View all comments

-2

u/Due_Warthog749 Oct 16 '26

Python is AI and nodejs/etc is "you know front AND back ends at the same time" stupidity.

Go is still WAY faster than Java. It's also WAY less code and much easier to learn and build with.

Java is bloated as hell. It had its place.. but verbose OOP is a dying language especially in the age of AI. When AI can use ANY language and build the same shit, why wouldn't you use Rust, Zig, C or Go for pretty much everything? AI does it the same in all those languages.. so any CLI or back end makes sense to do it in C, Zig or Rust and API/web back ends in Go are its bread/butter.

Python, JS, etc though better than they were are STILL slow, memory hogs, etc.

5

u/spacetrain31 Oct 17 '26

Just because you don’t like Java doesn’t mean it doesn’t have its use cases. It is a perfectly capable backend. Not everyone wants to learn rust, zig, c or go for backend.

2

u/Due_Warthog749 Oct 17 '26

Oh I like Java. Did it for 20 years. It's fine. I just discovered much faster ways with far less code to do the same thing. It's too verbose these days. It was great back in the JEE days.. I'd fight anyone over .net or Delphi or php, etc. But improvements in other options have come along that are just better for most things. Coming from 20 years of Java I feel confident in that statement. THAT said, I have NO DOUBT Java has improved too. But even if its threading and such got better, most that I see still rely on Spring Boot. I dont even know what happened to JEE or if its still going on. I enjoyed the shit out of the JSP and servlet days and replicating sessions across servers in clusters, etc. Fun stuff back then.

0

u/Sad_Importance_1585 Oct 17 '26

This is the problem. Java platform has much better alternatives than Spring Boot today. Sticking to Spring Boot is what keeps Java behind other langauges.

2

u/Due_Warthog749 Oct 17 '26

I have no doubt.. and AI can absolutely "generate" frameworks like what Go, Rust, etc have in Java as well. I also am BIG against dependencies.. and would MUCH RATHER home build small specific well tuned frameworks than use bloated messes like Spring despite how good it was in it's heyday.

I see this a bit in Go to. Frameworks like GORM and Gorilla try to mimic Spring and similar large frameworks that do it all. Today, with microservices and/or docker containers that can easily spin up instantly to auto scale.. and stateless back ends with front ends using JWT, etc is the far better way to go. It's been around for many years now so its well understood. Serverless, "agent" endpoints, etc.. are all great ways to handle things like APIs, messaging, etc without requiring large frameworks. Technically you can build/do that in any of these languages.

I know the JVM has gotten much faster too, but frankly my go to is WASM these days.. insanely fast, super small, easy to build specific things, etc. Again can do it in Java, Go, C, etc.. whatever one fancies.

2

u/BenchEmbarrassed7316 Oct 17 '26

When AI can use ANY language and build the same shit, why wouldn't you use Rust, Zig, C or Go for pretty much everything?

Are you really putting AI development in Rust and AI development in C on the same level?

There is a huge difference in terms of the number of errors a compiler can catch.

2

u/Due_Warthog749 Oct 17 '26

I am. It's still progressing of course, but both are quite capable. I've done both + zig and Go. Sure.. it's not without issues at times, but each new generation of models trained on more and more code is definitely improving.

3

u/BenchEmbarrassed7316 Oct 17 '26

The point is that, for AI development, a key factor is the number of errors that can be detected automatically and deterministically. Rust and C are at opposite ends of the spectrum here.