r/java • • Mar 19 '24

Java 22 officially released

https://mail.openjdk.org/pipermail/jdk-dev/2024-March/008827.html
294 Upvotes

54 comments sorted by

View all comments

27

u/tomwhoiscontrary Mar 19 '24

I'd completely missed that 461: Stream Gatherers (Preview) existed. This is great!

One way to describe it is that it brings the extensibility of collectors to the intermediate stages of the stream. Another is that it's roughly Clojure's transducers rephrased in Java. I had a go at doing that myself, but it's just not possible to do a great job of it without modifying Stream - which this JEP can do!

5

u/tampix77 Mar 19 '24 edited Mar 19 '24

A bit more clunky than clojure's transducers, but a welcome addition, that's for sure :)