February 2014
Intermediate to advanced
160 pages
4h 59m
English
Programs must be written for people to read, and only incidentally for machines to execute.[17]
With Java 8 we have two powerful tools: the object-oriented approach and the functional style. They are not mutually exclusive; they can work together for the greater good.
In OOP we often mutate state. If we combine OOP with the functional style, we can instead transform objects by passing lightweight objects through a series of cohesive functions. This can help us create code that’s easier to extend—to produce a different result we simply alter the way the functions are composed. We can use the functions, in addition to the objects, as components to program with.
In this chapter ...