Tell HN: I kinda want to go back to Java
I left Java behind after using it for 20 years around 2018 or so. I've been using Python, Typescript since.
I think Python has made huge strides in recent times... but now with LLMs and Agentic programming - I feel like Java would absolutely be worth it again. Python helped us invent LLMs - it's quite possible if it didn't exist we would never had invented them. But my life has always been in systems, backends, etc..
Java was too verbose. Too many things to NAME. Now, agents can name shit for us. I feel like the verbosity would be absolutely worth it now - and put this compressed code life in Python behind me.
Anyone else feel this way, or are you Go/Rust/Python 4 life now?
I'm only hoping to discuss this with ex-Java's.
30 comments
[ 3.6 ms ] story [ 57.4 ms ] thread11 itself had some nice stuff over 8, which I’m guessing may have been what you were on.
Though I have moved on to Golang at work & Rust at home, I will always have a soft spot for Java.
For me the time spent coding is the last step. The more important task is always in identifying a problem worth solving and formulating what I hope to be a coherent design.
The actual typing, while tedious, is the least important part. Just the same, I am sometimes feeding a snippet to a LLM and having it fill out the tedium. Results vary, but the verbose style and longWindedDescriptiveNames seem to help. A few inline comments pick up the rest. The LLM will also expand these into Javadoc type comments.
I never really was super concerned about verbosity. LLM's should help here yes.
Maven was an interesting blessing and a curse. Theres so many plugins that do so many various things. It took me a lot of my Java career before I stopped trying to find good docs and references & started just diving into the source to see how plugins worked: it freed me from a lot of feelings that everything was mystical & special & showed me many plugins were quite direct & simple, with a few outliers that did ludicrously many things (usually in a bad way).
the top post is pretty vague about what people think they might want or enjoy from Java today. I'd be curious to know more specifics about what folks think are highlights.
Also for the record I left around when java 8 was finalizing, IIRC? Long time.
You do realise the Python libraries which work in this space are written in C, right?
Java wasn’t just too verbose, it had bad IDEs and build systems.
If you want to go back, might I suggest Kotlin or C#?
Just to name a few: half of ML is here (records, pattern matching), we have virtual threads and soon structured concurrency, ZGC, and many more. Project Valhalla (value classes) has been long in the making, hopefully landing in a few years.
Frankly, I had worked with Kotlin and Scala in the past, but nowadays I barely see the need. Yes, Kotlin has if-expressions and null safety and immutable collections, Scala has its type system, but there are also many compromises, and to be honest, these alternatives look less and less appealing as time passes.
The gap has narrowed in recent years, but all the new features of Java have been there for years in Scala, and with neater syntax in Scala. Many Java design patterns are built into the Scala language itself, and the type system is phenomenally powerful. It’s a language where I am constantly learning, even ten years in. It’s wonderful.
Saying this, Java was and is in many ways one of the best ecosystems to write software out there, if not the best (when it comes to server side software).
Maven is my favorite build systems so far: Default directory layout means everything has its place, IDEs can easily open any kind of Maven project, and being declarative, one can easily analyze pom.xml files. (I hate writing XML and I still like Maven.)
The next thing is Javas standard library. Well documented and big. Has it better and worse parts? Sure! But what people which never used a language with a good standard library don't get, is that even a bad standard library which is widely used is far better, than the npm-of-the-week clusterfuck, which means that nobody can read three lines of code and really understand, what is happening.
The IDEs are top notch, and you get even free ones (NetBeans, Eclipse) which can rival JetBrains and Visual Studio easily.
... and finally, Java is the only language that I know of, which has multiple strong companies and initiatives behind it, thanks that nobody trusts Oracle (rightfully).
Finally, Java code also got shorter, DI style is IMHO a very good default in any programming language (OOP, FP, Imperative), the community settled mostly on JUnit, so there are never discussions which of the 23 competing test frameworks to use...
In the end, there is a lot of rightful criticism of Java (historical baggage, too late when it comes to AOT, no modern GUI frameworks and a steep learning curve). Java getting new features with the new JDK releases is kind of double edged sword: Many things are good ideas, but they make the language more complicated at the same time.
The verbosity was IMHO never a big thing, because Java was always meant to be used in an IDE, for bigger projects explicit trumps implicit and finally newer revisions introduced stuff like 'var' statements etc.
It is kind of sad, that the Linux community never really jumped/accepted Java for desktop development (which might be explainable, when looking back at the lack of speed of Java in the 90s and the disastrous Solaris Java apps which were simply to slow to be usable).
Anyway, for work I am now using Golang, and it is hilarious how many lessons Golang did not learn from Java, when it comes to language design, although the tooling is top notch and the standard library has at least almost everything needed for writing backend services.
I don't see Java making a comeback, and I don't see anything modern going to replace java at the same time.
* Comparably slow startup. It seems to take so much long to compile the code and startup the JVM for a large application compared to a similar JavaScript/TypeScript application.
* Yes, Java is verbose and that can be annoying but this super low on my list. I can work with this.
* Java forces OOP on you. The original benefit of OOP is efficient memory conservation, but these benefits are lost on garbage collected languages. The primary reason OOP continues to exist is stylistic preference and it’s a preference I don’t like.
* Error states and stack traces feel like a drunk person throwing up. They are all over the place, far too large, and feel like they blame the user for even daring to execute the code.
It’s not all bad. People who write Java seem like they know what they are doing, and I am fully aware this me being naive. Most corporate JavaScript people absolutely have no idea what they are doing. The difference in insecurity and output is strikingly visible from a distance.
I do want to do something meaningful/professional with Go but haven't gotten around to trying it out. I also sort of feel most programming language additions aren't game changers these days. Much like smart phones, the killer feature days are over, small incremental additions are nice.
The killer feature to me is using AI for tedious tasks or syntax I don't remember and in that respect I do wonder if Java would be easier to deal with than what I remember.
J2ME > J2SE > J2EE (that I never used)
The JVM is the final emulator.
I think everyone should write their own minimal JVM before judging?
Note: Java and Kotlin are two different languages :-)
> I hate gradle. It’s overly complicated.
People hate build systems, that's how it is.
I've been doing .NET for years and had to spin up a Java Spring Boot app and it was so painful compared to .NET (esp maven/gradle vs nuget).
Yes I know C# is cross platform and I got my start working with AWS deploying C# apps in Linux runtime environments in both Lambda and ECS/Docker/Fargate.
To a first approximation no one chooses .Net for green field projects except for old school MS shops.
"Give me a name for this thing" is the last micro-managing coding task I would assign to an LLM, because the entire point of the name is to express my own intent behind the code.
Besides which, you haven't identified something you actively dislike about Python, just that a problem you supposedly used to experience in Java is supposedly ameliorated now.
Sorry, but this is nonsense.