Robert Westin’s Post

I’ve coded Java on and off for 20+ years. Mostly since Java 7. I’m not trying to start a war! 😅 It paid the bills. Built real systems. But I moved away. Node took over most use cases. Java stayed for complex enterprise systems. That made sense then. Now I’m not so sure. Java has one of the strongest ecosystems for enterprises. Stable, mature, everywhere. No debate. But the game is changing. With agentic coding, the question shifts. Not what’s best for humans. -> What’s best for the agent. Java can be compact with heavy abstractions. But then test automation gets fragile. The feedback loop breaks fast. And in generate–test–rewrite cycles, that hurts. Java is still verbose. And verbosity costs. Tokens cost money. Footprint matters. TypeScript and Rust express the same logic with less overhead. More room for the agent to iterate. LLMs are improving on Java. The gap is shrinking. But most companies still run bloated frameworks. Java isn’t dead. (yet) But its role is shifting. Critical for infrastructure. For complex systems. Because it’s tested and trusted. Maybe even as a bridge in COBOL migrations. But for everything else? NO The center of gravity is moving. #java #rust #agentic Gunnar Strandberg AI Engineering In Stockholm Agentics Foundation (Elixir if Erik Schön decides)

  • No alternative text description for this image

Hilarious that TS falls in the "fast and light" category. Look, I think there are better languages than Java now, but the language has come a long way, and in performance, it easily beats TS when run properly. Why not switch to a language like Scala, where you get the best of both worlds? Real type-safety and real performance. If you're just using LLMs to write code for you, then why not use a more expressive and safe language?

I’ve seen comments like this, which is a pity because they compare apples and oranges. Don’t compare Java in general with TypeScript or Rust. Yes, Java has a huge ecosystem. Instead, compare them with Java + Spring or Java + Quarkus—then you’ll have similarly focused sets of possibilities. Java can be used for almost everything, but if you constrain yourself to specific frameworks, you end up with a similar environment as in TypeScript or Rust. In TypeScript, Rust, and also Go, you don’t have as many ways to achieve the same thing.

Java is not verbose, especially modern, functional style code is quite concise. Main Java problem is not the language nor performance (and even less verbosity). Main Java problem is the following the herd, building standalone apps and throwing out all Java advantages. Once we fix that, there will be no better general purpose backend platform, fast, lightweight, scalable and flexible. I believe I have the fix: https://pragmaticalabs.io/aether.html

Like what is meant by "...Java is still verbose. And verbosity costs .."? . Can you explain that to a dummy like me, please?

This isn’t quite true, but i understand your premise. There was an energy and performance study performed on an extensive set of languages where Java obtained a score of 1.98 (1.98 less performant than the equivalent C), where TypeScript was 21.5, nearly 11x less energy efficient than Java. Rust did very well here being effectively the same as C with added safety. Java is rapidly becoming very efficient, and very modern. By design, the language watches the industry to not repeat mistakes, but its evolution cycle is also very inclusive. I definitely argue against the fragility of testing and security. If we consider how many times npm has been compromised, and how Python developers often don’t test, we Java developers are conditioned to perform extensive test coverage. I argue, that Java is actually the silent workhorse of AI and ML, it’s the engine that drives all our technologies with data. https://greenlab.di.uminho.pt/wp-content/uploads/2017/09/paperSLE.pdf

Like
Reply

The main thing holding JavaScript/TypeScript back for me is that they are inherently single-threaded. Sure, you can spawn a separate process (that also only has a single thread), but there is no shared memory at that point, meaning you have to rely on inter-process communication instead. Whereas multi-threaded processing is a first class citizen in Java. Not saying Java is better, it certainly has its downsides, but they both still have their place in system architecture.

Go assembly or go home, that's what I always say. Nothing's faster.

I recently taught Java for two years and despite not having used it much professionally, it grew on me. Partly because of the modern features that have crept into the language for the past 10 years, and partly because of the rapid prototyping and high performance you get with Spring. If I were to write a serious web application, I'd use Spring just because of the combo of high performance and rapid prototyping. It really does feel solid like ASP.NET MVC, Django, Ruby on Rails. Lots of ORM magic, automated scaffolding, patterns that save time, most things having been already made. It just sucks that your container images take up >350MB.

Like
Reply

Yes, and most systems still run the old legacy code, which requires a lot of efforts to migrate to latest Java. But, AI is helping a lot and bridging the gap of several years to just several months

Like
Reply
See more comments

To view or add a comment, sign in

Explore content categories