4 ms·
Woah, that streaming abstraction looks really slick, especially given that it can be automatically parallelized. The idea of doing a one-line parallel map-redu
by spartango 14y ago
Woah, that streaming abstraction looks really slick, especially given that it can be automatically parallelized.
The idea of doing a one-line parallel map-reduce that is
collection.stream().parallel().map(operation1).reduce(operation2);
is surprisingly cool imo. And the availability of streams across the collections framework allows that they can be used in routine programming.
- eranation 14y agoYep, Java 8 starts to look a lot like Scala
- pfalls 14y agoAll I ever heard about with Java 8 was lambdas (which is understandably the big name new feature), but streams, in my opinion, are just as exciting. Unlike lambdas and they're new syntax, streams seem like something any developer can quickly pick up and start taking advantage of.
- kainsavage 14y agoI think it gets even easier than that since stream/parallel are the basic calls: collection.parallel().map(operation1).reduce(operation2);