Image from O'Reilly Title: Functional Thinking: Paradigm Over Syntax
Author(s): Neal Ford
Publisher: O'Reilly Category: Advanced Java
O'Reilly wrote:If you’re familiar with functional programming basics and want to gain a much deeper understanding, this in-depth guide takes you beyond syntax and demonstrates how you need to think in a new way. Software architect Neal Ford shows intermediate to advanced developers how functional coding allows you to step back a level of abstraction so you can see your programming problem with greater clarity.
Each chapter shows you various examples of functional thinking, using numerous code examples from Java 8 and other JVM languages that include functional capabilities. This book may bend your mind, but you’ll come away with a much better grasp of functional programming concepts.
* Understand why many imperative languages are adding functional capabilities
* Compare functional and imperative solutions to common problems
* Examine ways to cede control of routine chores to the runtime
* Learn how memoization and laziness eliminate hand-crafted solutions
* Explore functional approaches to design patterns and code reuse
* View real-world examples of functional thinking with Java 8, and in functional architectures and web frameworks
* Learn the pros and cons of living in a paradigmatically richer world
If you’re new to functional programming, check out Josh Backfield’s book Becoming Functional
The purpose of Functional Thinking is to help intermediate to advanced programmers familiar with imperative programming to start thinking in a more 'functional' way. At 157 pages it's not a big book, which is not a criticism. I am encouraged to get stuck in knowing that it's unlikely to be a hard slog.
The chapters are cleverly laid out to take you through the shift in mindset as you progress through the book. From "Why": usual intro stuff, to "Shift": where Ford runs through the fundamental building blocks presenting some problems solved in Java, Scala, Groovy, and Clojure, to "Cede": giving up control of low-level machinery to the runtime freeing you to work on more relevant problems, to "Smarter, not Harder": presenting language features that solve common problems such as caching and lazy loading.
The book extensively uses Java8, Scala, Groovy, and Clojure for the examples. It turns out the languages are not consistent in their naming of the core constructs so it was incredibly useful to link the concepts to the different implementations. A good smattering of examples using the Functional Java library for pre-Java8 JDK's will be a welcome addition to developers keen to start using the tools but stuck on old JDK versions.
The last part of the book gives a run through of the new functional language support in Java8 and concludes with a discussion the polygot world where developers work with imperative and functional paradigms together.
As a Java developer I found this a good introduction to Functional Programming and found the level of abstraction just right for me to get a handle on the concepts without getting lost in code. Don't get me wrong, there's a lot of code, but its for example rather than explanation.
Review migrated from old book review post ---
Disclosure: I received a copy of this book from the publisher for reviewing this book on behalf of CodeRanch.