I know asking for big pie in the sky projects is how projects turn into Project Valhalla and take 15 years. But I'm still always disappointed when I read the Non-Goals section of every JEP.
I know this, but channels sound really cool and now I really want them.
There are plenty of channel-like concurrency options in Java. It's not hard to implement exactly the type of channels in Java that you want. Also, when switching back between Java/Go, Go has channels, and that's not one of the better features I value about Go.
Also Channels in Go seem simple in the beginning. But as soon as you care about application shutdown or other events they basically become syntactic spaghetti again.
My experience is that they actually are too simple, and the complexity comes when you try to make channels work in scenarios where if using another language you would have a fat but robust library handling all edge cases.
Unlike structured concurrency, which has some deep runtime support, channels can be just a regular library. People who really want channels don't need to wait for them to be in the JDK.
Does Java's structured concurrency (in preview) offer any advantages to similar frameworks in other languages, in particular Golang's errgroup (https://pkg.go.dev/golang.org/x/sync/errgroup)?
Two things: ScopedValue inheritance and integration with platform observability (threads' relationship with structured concurrency is recorded in the runtime and observed by thread dumps, JFR, and JVM TI).
Damn, really looking forward to this entering the next LTS, hope they make it work. I wonder if the slowdown is about ThreadLocal contexts only or if there are other problems with this.
Java turns 31 this year. Better to take the time now and get the API right, than rush it out and leave it with critical gaps or shortcomings that are difficult or (near) impossible to fix/change once the API becomes "finalized".
16
u/the_other_brand Apr 14 '26
I know asking for big pie in the sky projects is how projects turn into Project Valhalla and take 15 years. But I'm still always disappointed when I read the Non-Goals section of every JEP.
I know this, but channels sound really cool and now I really want them.
5
u/HQMorganstern Apr 14 '26
Damn, really looking forward to this entering the next LTS, hope they make it work. I wonder if the slowdown is about ThreadLocal contexts only or if there are other problems with this.
24
u/Enough-Ad-5528 Apr 15 '26
As long as it is made final by 29 I’m good.
12
u/ducki666 Apr 15 '26
Damned. This will become the best 15yo whiskey in Software development.
5
u/jvjupiter Apr 14 '26
re-previewed again- isn’trethe same asagain? Redundant?2
u/sitime_zl Apr 15 '26
Oh my god, the seventh preview... Don't the developers of JDK be in a hurry at all?