3 ms·
Most of the methods mentioned in the article seem half-assed to me, especially when compared to the "natural" Java 8 functionality that's commonly available on
by LgWoodenBadger 10y ago
Most of the methods mentioned in the article seem half-assed to me, especially when compared to the "natural" Java 8 functionality that's commonly available on Streams, particularly .map() and .filter().
Maybe there are optimizations, but why would you have a custom signature to add a transformer (really it's just a map()) to forEach(), when you would normally just .map().forEach()?
- JackFr 10y ago> why would you have a custom signature to add a transformer really it's just a map()) to forEach() Might have to do with the parallelism. With the transformer in the forEach call, the transformer will (presumably) be on the same thread as the consumer. (That's just a guess--I haven't actually looked at code)