Sunday, 21 July 2013

Skimmer's Guide - Functional Programming for Java Developers



“Multithread programming requiring synchronised access to shared mutable state is the assembly language of concurrency.”

WHAT IS THE ABOUT? 

Dean Wapler brings to us "Functional Programming for Java Developers". Although two years old now, the book touches on concepts that are still highly relevant both today and upon the introduction of Lambdas to Java.

We begin with why functional programming is so important and look at actual techniques we can utilise. Immediately after we are encouraged to apply our learning in handy and thought provoking exercises. This format is followed in each of the following chapters and really helps to reinforce learning!

How we model our data and operate with it is the next focus, introducing the "functional power tools" that are filter, map and fold. Along with the following section on functional concurrency, these two form an incredible bounty of invaluable information.

Recapping on everything we have learnt, we look at how to improve our object orientated programming and where to go from here.

WHAT STOOD OUT? 

Declarative vs Imperative Programming (p. 7) 
Highlighting the key difference between functional and object-orientated programming using a well thought out factorial example.

The Actor Model (p. 41) 
Fantastic coverage of this concurrency tool which is short and sharp, very useful for beginners.


IIF YOU READ NOTHING ELSE... 

Why Functional Programming? (p. 1 - 5) 
Concise chapter on why Functional Programming actually matters.

Combinator Functions: The Collections Power Tools (p. 29) 
A brilliant section on tools that are crucial in any functional language: filter, map and fold. Covers both what these tools do and learning more through actually implementing them for a custom List data structure.

CONCLUSION 

Whilst this book is a great introduction to the basics, it lacks any great depth. Published in 2011, the available functional programming tools of the time (such as GS Collections and Google Guava) are surprisingly absent.

In my view, what is lacking in depth is made up for by having such a broad coverage in only 72 pages. This book forms a good bridge for those starting with functional programming to take toward exploring specific topics/tools in greater depth.

No comments:

Post a Comment