2 ms·
It's more comparable to Python iterators in combination with itertools, sequence comprehensions, and a few other things. It's arguably more powerful in that it
by bunderbunder 8y ago
It's more comparable to Python iterators in combination with itertools, sequence comprehensions, and a few other things.
It's arguably more powerful in that it's got some more bits and bobs out-of-the-box, and it's easier to do parallel stuff with it. But it's also arguably less powerful in that it's not particularly open for anyone who isn't a JDK developer to adapt for their own purposes. To make your own Python iterator that will interact nicely with anything else that's designed to operate on iterators, you only have one method you have to implement. To make your own implementation of Java's Stream interface, you've got a rather daunting list of 40 you have to implement.