47 comments

[ 2.1 ms ] story [ 68.0 ms ] thread
Android as always in shambles. Shame that neither Google, nor ecosystem cares about Java because they’ve bought JetBrains kopium.
I was pretty surprised when I learned recently that the Java alternative for green threads doesn't use colored functions. It put Java in a higher place in my perception.
JEP 504: Remove the Applet API

Glad to see this being removed. Java plugins especially on Linux were awful and required by tons of corporate stuff. Anyone remeber IcedTea Web? A functional and opensource Java plugin and Java Webstart implementation?

As someone who has been out of the Java world for many years, but recently forced back into it due to Android dev requirements, Post lawsuit, what is the relationship between Android (Google) and Java now? When can we expect 26 on Android? On that note, why is Android always so far behind? Is it because Kotlin is primary or is it deeper? Did the lawsuit play a role?
The new (ish?) Android UI toolkit is only useable from Kotlin and is implemented fully as a compiler plugin. Google has been clear that Kotlin is the Android language now and that's where new features are going.
Vector API (Eleventh Incubator) - maybe 11th time’s the charm.
I think astronomers could measure the age of the universe in nano-Valhallas. Every year, it feels 50% closer to completion...

In all seriousness I'm happy with what Mr. Goetz and the team have done. Sealed interfaces (java 17) + exhaustive switch statements (java 21) means we now have union types in java! And instead of jumping on the async/await bandwagon we now have a more general solution that doesn't lead to API duplication (virtual threads). But Valhalla has been a veeery long time coming.

the people that work on Java & the JVM are very smart.

it has become a best of breed language - hell its better than Go for industry purposes.

the drawback with Java will always be the CULTURE - (maybe someone can insert a quote of how in physics progress is only made, when old physicist die - I don't wanna be morbid ) but with Java same that's when the culture will change.

All those people using typescript (could be using Java - but the culture doesn't want them and consider them heretics for not embracing religion of OOP and FactoryFactory)

As a Go developer, this is right on the mark. I’ve been hearing good things about Java lately, so I decided to check out the language for the first time since 2012 or something. And I was impressed!

The language maintainers have added so many great features while maintaining backwards compatibility. And slowly but surely improved the JVM and garbage collection. So after toying around for a bit, I decided to write some personal projects in Java.

After a week, I gave up and returned to Go. The build tooling is still an over engineered mess. Third party library APIs are still horrible. I will never invest even 5 minutes in learning that horrible Spring framework when stuff like Django, Rails, or the Go ecosystem exist.

The community, and thus the online forums and open source libraries, still approach engineering and aesthetics in a way that is completely foreign and off putting to me.

With LLMs as they currently stand, and with the reasonably confident hope they will get better why even have anymore languages. Shouldn’t we just have everything coded in the most performant language which would be Assembly or C?
> hell its better than Go for industry purposes. [...] the drawback with Java will always be the CULTURE

The industry purpose for Go is that all codebases look more or less the same, so workers can jump into any project they've never seen before and instantly feel like they wrote it themselves. Google talked about that a lot around the time Go was released. It is why they created it instead of just adopting Haskell or something.

Some of that simply comes down to the language not allowing much creativity, but without the culture developers would still find a way to mess with outcomes. You can still write crazy Go code if you want to. The culture is the piece that matters. If Java doesn't have the culture, how does it fit in industry?

Java isn't even true OO. The only truly OO programming languages that I know of are SmallTalk, Obj-C, and Ruby
Hey even Go has got effective `FactoryFactory` stuff in a lot of open source projects. They just name it differently.
That and also the JVM is a marvel of engineering with millions of hours that were poured in by smart people over the last 30 years.

It can be as fast a C, supports a multitude of languages, introspection, surveillance etc.

The drawback is also the JVM. Its a heavy, bulky VM. The alternative being Go that is much lighter.
With all due respect, I'm fairly sure that anyone using "VM" the same way as you do here really think of it as a container or what.

It's a runtime, and go also has a similar, fairly fat runtime. It's just burnt into the binary instead of being shipped separately. (Hell, even Rust has a runtime, it's just very very lean compared to languages featuring a full GC like go and java)

You cant seriously compare JVM to the Go runtime. The JVM is on another level in size, complexity and bulkiness and size for a "compiled binary".

The Go runtime is mostly just for goroutines and other runtime stuff, like relection etc.

A go hello world binary is around 1mb, while the java one is (with a jre) up and around 50mb.

I dont think the Spring ecosystem is bad. In fact, its one of the more stable frameworks. Even spring AI which is built for AI agents a new use-case is very intuitive if you take time to learn its abstractions. Usually doesnt take more than a day of reading docs and writing some try-out code. The thing I really like about Java is the stability of its packaging ecosystem. Maven is XML (yuck) but is okay with the IDE integrations. Gradle has advanced features often missing in Python / Go such as build caching. The OOP stuff is also good because it scales with very large code bases. In, fact frontend esp React adopted a functional style which leads to complexities associated with hooks. A mixed approach is usually better. Overall, the only bad thing are the multiple unnecessary abstraction layers which are a pain in any language. Rest of Java is quite good.
> All those people using typescript (could be using Java - but the culture doesn't want them and consider them heretics for not embracing religion of OOP and FactoryFactory)

I assume you're specifically talking about the backend and not suggesting that people write Applets or use GWT or something.

There are no FactoryFactorys in Java. Never have been
Ah , Java, a language I pray I never have to ever touch again.
[flagged]
Cool. I feel as though I'll never be able to escape 8, or ignore Ellison's legacy, unfortunately.
Really glad to see we're getting a native PEM API.
I program in Java for more than 15 years now. I can resonate with people hating the language from it's early days due to the experience with all the enterprisy features and over abstractions. Or confunding Java with the Spring ecosystem. But Java came a long way over the years. It's now what many would call a "modern" language. It's less verbose, has many of the features people find appealing in Scala and Kotlin and it can even compile to native binaries using GraalVM. This made building CLIs in Java feasible. Or lambdas.
Do changes to Java itself impact e.g. Clojure? I think it uses many java primitives instead of emitting jvm byte code but I can be wrong.
Man I still have scars learning Java in college. Took the entire fun out of coding until I ended up learning C.
I haven't read a Java manual since the time of Java 8. Do you have any books or other resources you could recommend to catch up with all that has changed in these years?
A couple of books were helpful to me, both by Venkat Subramaniam and published by Pragmatic Programmers:

- Functional Programming in Java

- Cruising Along With Java (this covers everything else that is "new" other than functional programming)

I have been using Java since version 1.4. Both the language and its ecosystem have come a long way since then. I endured the height of the EJB phase. I adopted Spring when version 1.2 was released. I spent hours fighting with IDEs to run OSGi bundles. I hated building UIs with Swing/AWT, many of which are still in use today and are gradually being replaced by lovely JavaFX. When I look at code I wrote around 12 years ago, I'm amazed at how much I've matured too.
One of the best tools I built was years ago with Swing and Miglayout. Still remember it fondly.
All the changes look great. But I don't know how I feel about the syntax. A lot of things that very well could be first-class just aren't. Instead of a `lazy` keyword, we get `LazyConstant<T>`.

I'm sure there's reasons as to why. I just don't know them.

Because library code is easier to maintain and for people to understand.

And plus if you add a new keyword someone else will complain about complexity of keywords.

Once introduced, keywords and Java syntax is nearly impossible to change or to remove. If it's possible to get the job done using a class, perhaps with some JVM magic, it's not wise to whip out new syntax.
I wonder what percentage of java code in the world is still java 8, and always will be?
Still a lot, but in absolute terms the majority of Java applications are 8+ for 4-5 years now, according to Oracle's statistics - so they are a minority. It's just that there are so many java projects that it is still a huge number.
I think Java became popular because of Sun. My experience with Java-based apps is bad. Laggy, resource-heavy, IDE bound, and it causes premature hardware performance degradation.
Heh, you have no idea how many websites you interact with daily are powered by Java backends in that case.
Modern Java is pretty succinct and expressive and I enjoy working with it. Like any long-lived project, Java has its quirks and baggage but you can let go of that baggage if you want. The ecosystem is evolving nicely with new features and it is quite pleasant to work with these days. I’m looking forward to migrate apps at work to 26.
Seeing as we're having a $LANG war, after 15 years in JVM land, I moved to a Python / Go shop, and fuck I miss Java.

Not so much the language (although modern Java is pretty slick), but the stuff surrounding it.

* No typosquatting issues because every package has a group id verified by real humans and DNS TXT records.

* JMX as a standardized mechanism of exposing ways to interact with running code / expose metrics. (Even if you have to deal with the stupid ass protocol where you have to connect using a DNS identity the JMX server recognizes)

* Logging libraries that give people running the code control over what gets logged and how, not the developers (looking at you Golang, wtf is with your logging approach where devs have to explicitly consider the fact that you might want to run logging at DEBUG and code it into your start up args?)

* The ability (via JMX) to set, at runtime, one particular logger in one class or file to a desired logging level without restarting the application.

* The performance of the JVM.

* The vast FOSS ecosystem.

* Not having to fight C build chains for that one dependency that's using CGo or a Python wrapper around a C lib that no wheel supports for your given tuple of Python version, OS, and architecture.

Honestly, as someone who is a self-taught developer who taught himself in Python, I thought I was coming home to my first love.

Turns out, I really hate the horrible things you can do in Python - looking at you Django, don't be so dynamic your brains fall out - and really dislike the experience of trying to run a Go service compared to a JVM service.

Java and its ecosystem is just good at getting shit done in a predictable manner at both the dev level and ops level.