Looking forward for 461 since Viktor Klangs session about it at devoxx in belgium. making streams so much more versatile and flexible. glad that it gets more love now ❤ kudos to Viktor and you. a major gain for jdk development 🖖
I've been hoping for something like this to come to Java ever since I started enjoying the many variations of sequence manipulations in Clojure. Can't wait to finally get similar flexibility in Java! :)
Well, we now need a JEP for Stream Hunters ('dunno, maybe something running on a daemon thread and yielding some specific elements when processing marked streams on the main thread), so we can declare that the Streams API evolved into a hunter-gatherer stage. :D
Great addition to the API. It could basically replace all intermediate operations on a Stream. mapMulti, added in 16, already looks like legacy because it is a subset of what Gatherers will provide. A little bit unfortunated.
A Gatherer can do all kinds of things. It's easy to implement a filter with it - see 2:26. But you can also implement a bunch of other behaviors. A lot are mentioned throughout the rest of the video. If you want to better understand how that works, check out the companion video on my channel (link in the video description).
You mean 2:55, right? The code I show here is somewhat incomplete, so it fits on screen. All gatherers I show would have to be built in and returned from a factory method that takes arguments like the `nrOfElements` for `limit` and `mapper` for `map`. You can see this hinted at in the comment above the snippet I show. To see the full code: github.com/nipafx/demo-java-x/blob/main/src/main/java/dev/nipafx/demo/java_next/api/gather/CustomGatherers.java#L90-L97
I dunno, thats definitely more lively than coffee sipping, but too much gesticulation makes it hard to follow. I don't think java needs to try this hard to be hip 🤷 Also, would help a lot if it wasn't just one channel, because now we get a mix of different content delivery and presentation styles, while, in some cases, also covering same topics. Whoever would want to see it all, could still subscribe to them all. Got coffee fetish? - go see this distinguished gentleman showing how blissfully he can sip. Got ADHD? - go see a dude armwrestling for your attention. LTT got it right - it seems they have a channel for each taste of content 😁🙃
Ouch. I'm not trying anything, it's just who/how I am. 😢 We've been considering having several channels for a while now but there are lots of considerations on both sides of that argument and I don't think we're gonna do it.
Thank you for explaining this as well !
Looking forward for 461 since Viktor Klangs session about it at devoxx in belgium. making streams so much more versatile and flexible. glad that it gets more love now ❤ kudos to Viktor and you. a major gain for jdk development 🖖
Thank you! Positive feedback like this (for both the JEP and the video) is always appreciated. 😊
The idea seems very promising, can't wait for it!
This is big news! Thanks for sharing it!
I've been hoping for something like this to come to Java ever since I started enjoying the many variations of sequence manipulations in Clojure. Can't wait to finally get similar flexibility in Java! :)
@npexception do you use both at your current job, or just java ?
Well, we now need a JEP for Stream Hunters ('dunno, maybe something running on a daemon thread and yielding some specific elements when processing marked streams on the main thread), so we can declare that the Streams API evolved into a hunter-gatherer stage. :D
I'll forward this to Viktor (who's idea gatherers are) - let's see whether he can come up with something. 😂
Great addition to the API. It could basically replace all intermediate operations on a Stream. mapMulti, added in 16, already looks like legacy because it is a subset of what Gatherers will provide. A little bit unfortunated.
Good point on `mapMulti` - it really feels like a (weak) precursor to gatherers.
Thank you
Keep up the good work Nick!
Thanks, I will. 😊
I don't understand it. Sounds like it does the same thing as filter
Do you know what a filter does?
A Gatherer can do all kinds of things. It's easy to implement a filter with it - see 2:26. But you can also implement a bunch of other behaviors. A lot are mentioned throughout the rest of the video. If you want to better understand how that works, check out the companion video on my channel (link in the video description).
Perhaps try implementing limit() using filter.
8:55 Where did the mapper come from?
You mean 2:55, right? The code I show here is somewhat incomplete, so it fits on screen. All gatherers I show would have to be built in and returned from a factory method that takes arguments like the `nrOfElements` for `limit` and `mapper` for `map`. You can see this hinted at in the comment above the snippet I show. To see the full code: github.com/nipafx/demo-java-x/blob/main/src/main/java/dev/nipafx/demo/java_next/api/gather/CustomGatherers.java#L90-L97
haha for that mistake the gatherer will FINISH YOU 😂
I dunno, thats definitely more lively than coffee sipping, but too much gesticulation makes it hard to follow. I don't think java needs to try this hard to be hip 🤷
Also, would help a lot if it wasn't just one channel, because now we get a mix of different content delivery and presentation styles, while, in some cases, also covering same topics. Whoever would want to see it all, could still subscribe to them all.
Got coffee fetish? - go see this distinguished gentleman showing how blissfully he can sip. Got ADHD? - go see a dude armwrestling for your attention.
LTT got it right - it seems they have a channel for each taste of content 😁🙃
Ouch. I'm not trying anything, it's just who/how I am. 😢
We've been considering having several channels for a while now but there are lots of considerations on both sides of that argument and I don't think we're gonna do it.