r/java • • 25d ago

Withdrawing the Primitive Patterns preview feature in JDK 28

https://mail.openjdk.org/archives/list/amber-spec-experts@openjdk.org/thread/UYEK3PGOHN6R56AHJTSLPGAY363K666S/

Primitive Types in Patterns will be removed in JDK 28 and will no longer be available in that release.

The Valhalla project has been exploring a new vision for Java numerics, including the possibility of user-defined numeric types. New kinds of numeric types would need to support exact numeric conversion, and vice versa. Given that the Valhalla work is still evolving, it would be premature to finalize Primitive Types in Patterns with their current definition of exact numeric conversion.

95 Upvotes

36 comments sorted by

View all comments

-13

u/sitime_zl 24d ago

I've gotten used to it by now. We still don't even have proper string interpolation after all this time.

Maybe it's time for the Java team to start using AI themselves to speed things up.

When are we finally going to see meaningful improvements to Java's memory footprint? I'm not asking Java to compete with Rust, but could we at least get closer to Go?

In the AI era, I feel that many traditional language features are becoming less important than they used to be. Personally, I'd much rather see Java focus on memory efficiency, simplifying its runtime and deployment experience, and making itself a better platform for building AI Agent applications.

I've been a Java developer for over a decade, but I'm gradually finding myself turning to other languages for new projects, including Python, Go, and Rust.

And the reason is simple: from an AI coding agent's perspective, they're all just programming languages. If I want to build something quickly, I can use Python. If I care more about performance and resource efficiency, I can choose Go or Rust.

So where does that leave Java?

Right now, Java still benefits enormously from its existing ecosystem, enterprise adoption, and decades of investment. But how long can it keep relying on those advantages?

If, a few years from now, GitHub is increasingly dominated by new projects written in other languages, what compelling reason will developers have to choose Java?

As someone who has spent more than ten years working with Java, I genuinely hope the Java team takes this shift seriously. I'd rather see Java evolve than slowly become a language people use mainly because of legacy projects.