Summary
We looked at some prominent reasons to adopt the FP paradigm.
Firstly, we saw what is imperative programming and the notion of state modification.
FP allows us to program at a higher level of abstraction. We looked at some common examples of applying such abstractions.
We saw how FP encourages us to compose systems from existing building blocks. These blocks themselves, in turn, could have been composed out of other smaller blocks. This is an incredibly powerful way to reuse code.
The declarative style of programming is easily seen in how SQL queries work. This allows us to work at a higher level of abstraction.
FP promotes this same declarative style. For example, we normally use implied loops. Implied loops in FP are similar to how Unix shell filters process data.
Controlling changes to a program's state is way too hard. We saw how important this is, given the multithreaded world we developers live in. We saw how FP makes it a breeze by dealing with mostly immutable data structures.
In the next chapter, we will look at some fundamental concepts in data structures and algorithms.