Saturday, January 31, 2015

Geek: Ok, so I'm late to this party...

Geek: Ok, so I'm late to this party ... but Java 8's new streams and method references are awesome!  I'm still getting used to the new lambda support, and so far, not finding it to be particularly useful in the kinds of coding I'm doing.  But streams and method references?  Wahoo!!!

For whatever reason, the notion of applying primitives like filters, min, sum, and so on to collections of objects has been something I've done a lot of.  In the past, I've often extended the generic collection types (ArrayList and HashMap, especially) to provide these primitives as I needed them.  The new Stream library allows me to do the same thing without having to extend the generic types at all, while still having superbly readable code.  I'm feeling much Stream love here :)

No comments:

Post a Comment