r/java • • Sep 20 '22

Java 19 / JDK 19: General Availability

https://mail.openjdk.org/pipermail/jdk-dev/2022-September/006933.html
252 Upvotes

64 comments sorted by

View all comments

90

u/Joram2 Sep 20 '22

Congrats Java team!

  • Virtual threads delivered. They are like Goroutines but the Structured Concurrency API really makes it better. Will any of this be out of preview for the next LTS release?

  • Amber is making amazing progress. The exhaustiveness checker still needs improvement, but great job.

  • Panama looks awesome for projects that have to interop outside of the JVM

If Valhalla really delivers in Java 20 or 21 and value/primitive types provide performance improvements, that will be a home run for the Java team.

16

u/mauganra_it Sep 20 '22

(Virtual Threads have Preview status only and in theory could still be completely yanked from the JDK)

28

u/Joram2 Sep 20 '22

Completely pulling virtual threads seems quite unlikely. The preview status just means that the Java devs are warning that they may change APIs. For smaller projects that often isn't a big deal, but for bigger projects that span lots of different developers in different companies, breaking changes are a big deal.

-1

u/elastic_psychiatrist Sep 20 '22

This is sort of implied in your message, but to be explicit for others: preview status is about more than potential API changes, it’s also about stability. The feature is not production ready and should not be used in production.

4

u/Joram2 Sep 20 '22

The feature is not production ready and should not be used in production.

This official doc (https://openjdk.org/jeps/12) from the Java team says

Previewing a feature in the JDK will encourage tool vendors to build good support for the feature before the bulk of Java developers use it in production.

which implies Java developers will use preview features in production. There is nothing in that official documentation saying preview features shouldn't be used in production.

Personally, I would prefer they make that clearer.

1

u/TheMode911 Sep 20 '22

I do not understand how you come to this conclusion, before to me means "before the JEP gets out of preview" otherwise there wouldn't be any point in previewing it.