by pwpwp on 9/22/23, 3:02 PM with 185 comments
by adra on 9/22/23, 4:06 PM
Expect a lot of libraries to start release versions that are java 21 baseline because of this feature alone. We're in for a little bit of dependency hell for the short while. Thankfully, devs have been exposed to a mostly final loom for a year, so my hope is that at least the big projects are well on their way to quick adoptions.
Unlike the 8->11 migration which largely brought pain, the 8->21 release brings with it a ton of value that i think will encourage most shops to actually pull the trigger and finally abandon 8.
by ecshafer on 9/22/23, 3:43 PM
I would love if Java pattern matching could at least get to the level of ruby pattern matching. Ruby pattern matching will allow you to deconstruct arrays and hashes to get pretty complicated patterns, which is really powerful. Right now it seems like Java might have that with a lambda in the pattern, but its not going to be as elegant as ruby where:
case {name: 'John', friends: [{name: 'Jane'}, {name: 'Rajesh'}]} in name:, friends: [{name: first_friend}, *] "matched: #{first_friend}" else "not matched" end #=> "matched: Jane"
But the big change here is virtual threads which should be a game changer.
by aggregat on 9/23/23, 7:14 AM
We have a hundreds of third party dependencies across the code base, a lot of the big ones (Hibernate, Spring, a lot of Apache). We write a big web application and maintain a big legacy desktop application in Swing.
We run a dedicated nightly CI job that is on the latest Java release to get early warning for any incompatibilities. After the painful migration from 8 to 9 so many years ago it has been smooth sailing.
In all those version upgrades over all those years and dozens of on premise installations with big customers we have never had a regression or a problem that was caused by the runtime itself.
by PaulHoule on 9/22/23, 5:43 PM
(2) I've looked at other ways to extend the collections API and related things, see
https://github.com/paulhoule/pidove
and I think the sequenced collections could have been done better.
(3) Virtual Threads are kinda cool but overrated. Real Threads in Java are already one of the wonders of the web and perform really well for most applications. The cases where Virtual Threads are really a win will be unusual but probably important for somebody. It's a good thing it sticks to the threads API as well as it did because I know in the next five years I'm going to find some case where somebody used Virtual Threads because they thought it was cool and I'll have to switch to Real Threads but won't have a hard time doing so.
by Vicinity9635 on 9/22/23, 7:02 PM
What is with this awful formatting? https://i.imgur.com/nQmt7Qo.png
by marginalia_nu on 9/22/23, 4:18 PM
Dunno, several of these are tangible QoL boosts:
Math.clamp(), List.reversed(), List.addFirst(), List.addLast(), Character.isEmoji()
by hinkley on 9/22/23, 7:40 PM
Google is not helping.
by Someone1234 on 9/22/23, 4:53 PM
by anonymousDan on 9/22/23, 9:25 PM
by mrkeen on 9/22/23, 4:53 PM
How do I reason about the order in which the calls change the state of the world?
by logicchains on 9/22/23, 8:41 PM
by ivanjermakov on 9/23/23, 10:40 AM
I'm aware of `permits` clause, but it's not good enough.
by sylware on 9/23/23, 10:07 AM
Do those exist?
by bullen on 9/23/23, 3:53 PM
Going to be interesting!
by billfruit on 9/22/23, 5:24 PM
by hoistbypetard on 9/22/23, 11:36 PM
by baq on 9/22/23, 4:27 PM
> "Hello, World!".splitWithDelimiters
> ("\\pP\\s\*", -1)
> // ["Hello", ", ", "World", "!", ""]
> MehMy brain just melted.
by waynesonfire on 9/22/23, 4:58 PM
Most of which were likely introduced during new feature development in recent releases. To suggest that this on its own somehow manifests a more stable jdk compared to some ancient, battle tested version of the jdk is debatable.
I find it rather concerning that so many bugs exist to begin with. Why are these not caught sooner?
Has the whole world gone crazy? Am I the only one around here who gives a shit about quality? Mark it zero!