4 ms·
All streams work very similarly. Much more similarly than if you mix and match all kinds of operators together. Think Unix pipes they are easy to understand be
by galaxyLogic 6y ago
All streams work very similarly. Much more similarly than if you mix and match all kinds of operators together.
Think Unix pipes they are easy to understand because they all behave similarly.
Yes sometimes plain code is better sure but in cases where streams fit the job they are better.
I guess the main point is that streams operate on multiple elements and they operate the same on every element. Therefore you don't need to reason what happens to every element that goes through the pipe.
It is a bit like adding and multiplying matrices, you can understand the calculation without having to mentally follow how each matrix element is processed.