Java 20 / JDK 20: General Availability(mail.openjdk.org)
mail.openjdk.org
Java 20 / JDK 20: General Availability
https://mail.openjdk.org/pipermail/jdk-dev/2023-March/007517.html
339 comments
What are some good primers to understand the prominent new Java features? Not just in 20, but since, say, 8. Asking as someone who would like to be cursorily familiar with Java, but does not use it day to day. I'm very familiar with things like auto type inference, pattern matching, multi-line strings and structured concurrency from other languages, so I'm not looking for an introduction to Java. I'm looking for something like "Modern Java for the experienced Rust/Python/C++ programmer". Thanks!
Really excited to see how virtual threads are taken up by developers, and if they affect the larger programming language community. They just really seem like "the best of both worlds" to me: the high scalability/low resource usage of async/await, with the ease-of-use experience of threads (e.g. not having to worry about "function coloring").
As a Clojure programmer, I don't care about any of the Java language features or improvements, but I'm super happy that I'm getting a state of the art JVM that is continuously developed, maintained, extended and optimized, over a time scale of decades.
This is incredibly useful: having a good VM to run your code in, with good modern garbage collectors, is not an obvious thing (as many other languages have learned).
This is not the LTS release, so I won't be switching to it, but I'm looking forward to the next LTS.
This is incredibly useful: having a good VM to run your code in, with good modern garbage collectors, is not an obvious thing (as many other languages have learned).
This is not the LTS release, so I won't be switching to it, but I'm looking forward to the next LTS.
More info on 20:
Announcement: https://inside.java/2023/03/21/the-arrival-of-java-20/
VM improvements: https://tschatzl.github.io/2023/03/14/jdk20-g1-parallel-gc-c...
Non-JEP Improvements: https://nipafx.dev/java-20-guide/
Announcement: https://inside.java/2023/03/21/the-arrival-of-java-20/
VM improvements: https://tschatzl.github.io/2023/03/14/jdk20-g1-parallel-gc-c...
Non-JEP Improvements: https://nipafx.dev/java-20-guide/
Note all the new cool stuff is incubator and preview status and I'm a little worried that this will still be the case for the JDK 21 stable release.
its amazing how much the world hasn’t been able to keep up with java. github PRs still have no syntax highlighting support for record and var
Now even Java has pattern matching, what's Javascript's excuse?
Literally the only feature preventing Typescript from being my perfect language.
Literally the only feature preventing Typescript from being my perfect language.
A good coverage of all the JEPs included in JDK 20: https://foojay.io/today/its-java-20-release-day-heres-whats-...
Damn, time flies.
I remember the excitement from the different alpha/beta versions that were coming out in 1994/1995.
I remember the excitement from the different alpha/beta versions that were coming out in 1994/1995.
Coming from the telegram bot of hacker news, where this post has a lot of downvotes (21 down to 6 up, which is quite a lot for how many reactions usually are there), could someone (perhaps even from people who downvoted) explain why this news is met with such negativity?
I kind of assume it's due to the cliché Java-oriented hatred, but curious to hear opinions...
I kind of assume it's due to the cliché Java-oriented hatred, but curious to hear opinions...
More details on 20:
Announcement: https://inside.java/2023/03/21/the-arrival-of-java-20/
VM improvements: https://tschatzl.github.io/2023/03/14/jdk20-g1-parallel-gc-c...
Non-JEP Improvements: https://nipafx.dev/java-20-guide/
Announcement: https://inside.java/2023/03/21/the-arrival-of-java-20/
VM improvements: https://tschatzl.github.io/2023/03/14/jdk20-g1-parallel-gc-c...
Non-JEP Improvements: https://nipafx.dev/java-20-guide/
Minor typo in the linked site:
"JDK 20 reached General Availability on 21 March 2022"
Should be 21 March 2023
Not sure who can edit that page but putting here.
"JDK 20 reached General Availability on 21 March 2022"
Should be 21 March 2023
Not sure who can edit that page but putting here.
I'm curious what is meant by a "preview feature, or second preview feature, or..." in a released product?? I don't suppose they are going to remove it later. So in what way is it a preview? Are they signalling that it might have breaking changes in the future?
Here's me wondering how many more years will pass before the Wayland support is going GA.
Could the pundits of HN please compare this release with Kotlin?
This seems like an appropriate place to post the official Java rap:
https://youtu.be/b-Cr0EWwaTk
What's the relationship between the Java releases and GraalVM releases?
As an engineer that last used Java when it was Java 11, I cringe at the thought of diving back in. A trade-off of increased release velocity for any language I suppose.
I still don't understand what's the correct way to replace thread locals holding initialization heavy & non thread-safe instances besides using a pool which produces a lot of overhead when using loom/virtual threads. In the past, with ThreadLocal, you'd have one instance per thread, making sure that those instances could only be used once and would only be instantiated for all threads of your (acceptor) thread pool
Does anyone know the solution?
Does anyone know the solution?
Structured concurrency looks a lot like C#'s Task library without the async/await sugar but with the exact same footguns.
Joining into a synchronous function is an anti-pattern in C# because you consume threads. This seems to be the same, except with the assumption that virtual threads are fine.... But that's not an assumption that can be made by the method writer, right?
Joining into a synchronous function is an anti-pattern in C# because you consume threads. This seems to be the same, except with the assumption that virtual threads are fine.... But that's not an assumption that can be made by the method writer, right?
Why is it difficult to determine what those features are 429, 432, 433, etc. How difficult would it have been to put links there so one can click on the link to see what it is. Have these people hard of hyper-text markup?
Does anybody know if there are significant improvement fir java on arm in this release?
> structured concurrency
That's another huge effort which delivered us an imperfect abstraction.
I would prefer to have HKTs and typeclasses, so I may implement my own IO monad.
That's another huge effort which delivered us an imperfect abstraction.
I would prefer to have HKTs and typeclasses, so I may implement my own IO monad.
virtual threads are still in preview. At which stage/release will they be in regular usage? (not preview)
Is anyone planning to use virtual threads, at this stage?
i understand that virtual threads are very similar to goroutines in golang
i understand that virtual threads are very similar to goroutines in golang
And here I am still on Java 8 :/
Gist:
```
JDK 20 introduces six features:
- Scoped values for safe sharing of data across threads
- Record patterns for declarative data navigation and processing
- Foreign function and memory API for interoperation with code and data outside the Java runtime
- Virtual threads for lightweight concurrent programming
- Structured concurrency for simplified multithreaded programming
- Pattern matching for switch statements and expressions for concise and safe complex data-oriented queries
```
and
both seem as clear as
...am I misunderstanding the reasoning here? Is it being introduced to keep the grammar definition simpler?
1: https://foojay.io/today/its-java-20-release-day-heres-whats-...