3 ms·
Iterator is a very narrow API that needs to remain compatible with a lot of third party code, but streams rely on spliterators for concurrency. You can sort of
by erik_seaberg 3y ago
Iterator is a very narrow API that needs to remain compatible with a lot of third party code, but streams rely on spliterators for concurrency. You can sort of get a stream from any collection (or a spliterator from any iterable and make a stream), but it will probably do all work sequentially.
- riku_iki 3y ago> but streams rely on spliterators for concurrency which I never seen anyone uses and it makes everything more complicated they probably should've have some ParallelStream interface