venkat much more better talk this than agile stuff
@vaibhavm1986 Жыл бұрын
Exceptions can be handled always , what is to do with functional style , What Venkat is trying to mean here ?
@sheer_luck Жыл бұрын
The flow will break for functions down the line if don't return some number. If you put exceptionally in between 2 calls thenApply() and thenReturn(), you have to return (in this case) some number like -1 or something to handle the exception scenario. But choosing such number is difficult and error prone.
@TJ-hs1qm Жыл бұрын
Exceptions don't compose.
@nishantsabharwal13 Жыл бұрын
favorite comedian
@AtulSingh-g6e Жыл бұрын
In reality - don't ever use parallel stream.
@adambickford8720 Жыл бұрын
It would have to be cpu bound and have a sufficiently large amount of data to offset the overhead of parallel... and i haven't seen that happen in practice yet.
@cod3r1337 Жыл бұрын
I had literally one (yes, one) real world use case in close to 20 years of coding. It was handy to have around then (and that was in C#, Java didn't yet have that feature back then :-D) So is having this feature when you need it worth the complexity it adds to the core platform? I'm gonna have to say no.
@patrickhart6371 Жыл бұрын
@@adambickford8720 why wouldn't it help io bound code?
@rahulat85 Жыл бұрын
@@patrickhart6371 It would definitely help with IO, because instead of 1 thread doing IO there are 8 IO (assuming there are 8 cores). However here comes the tricky part, if you are the only consumer of system forkjoin pool, then all is gonna be well. but if you are interfacing with other system/libraries, they might be using forkjoin pool too, so effectively, you're blocking other components. Happy to be corrected!