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 🖖
@nipafx Жыл бұрын
Thank you! Positive feedback like this (for both the JEP and the video) is always appreciated. 😊
@tachyba Жыл бұрын
The idea seems very promising, can't wait for it!
@prdoyle Жыл бұрын
This is big news! Thanks for sharing it!
@npexception Жыл бұрын
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! :)
@geraldodev10 ай бұрын
@npexception do you use both at your current job, or just java ?
@matyas94k Жыл бұрын
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
@nipafx Жыл бұрын
I'll forward this to Viktor (who's idea gatherers are) - let's see whether he can come up with something. 😂
@derrickheng564 Жыл бұрын
Keep up the good work Nick!
@nipafx Жыл бұрын
Thanks, I will. 😊
@radoandrey2268 Жыл бұрын
Thank you
@heinrich3427 Жыл бұрын
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.
@nipafx Жыл бұрын
Good point on `mapMulti` - it really feels like a (weak) precursor to gatherers.
@USONOFAV Жыл бұрын
8:55 Where did the mapper come from?
@nipafx Жыл бұрын
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
@FriendlyNeighbourlyPerson Жыл бұрын
I don't understand it. Sounds like it does the same thing as filter
@31redorange08 Жыл бұрын
Do you know what a filter does?
@nipafx Жыл бұрын
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).
@prdoyle Жыл бұрын
Perhaps try implementing limit() using filter.
@dominicbue1404 Жыл бұрын
haha for that mistake the gatherer will FINISH YOU 😂
@zoladkow Жыл бұрын
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 😁🙃
@nipafx Жыл бұрын
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.