Functional Thinking: Paradigm Over Syntax 1st Edition
Use the Amazon App to scan ISBNs and compare prices.
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
Frequently bought together
About the Author
Neal is Director, Software Architect, and Meme Wrangler at ThoughtWorks, a global IT consultancy with an exclusive focus on end-to-end software development and delivery. Before joining ThoughtWorks, Neal was the Chief Technology Officer at The DSW Group, Ltd., a nationally recognized training and development firm.
- Publisher : O'Reilly Media; 1st edition (August 5, 2014)
- Language : English
- Paperback : 180 pages
- ISBN-10 : 1449365515
- ISBN-13 : 978-1449365516
- Item Weight : 10.4 ounces
- Dimensions : 7 x 0.41 x 9 inches
- Best Sellers Rank: #258,822 in Books (See Top 100 in Books)
- Customer Reviews:
Top reviews from the United States
There was a problem filtering reviews right now. Please try again later.
The author does an okay job at going over some of the really basic functional programming concepts. However, the points get lost in all the examples. The author often writes a brief paragraph or two on the concept of the section, and then will list multiple examples in Groovy, Scala, and Clojure, when a single example would be fine.
Switching between three functional languages adds no value to the content; it seems like the author is trying to reach as broad of an audience as possible. However, it just means that I skip 2/3rds of the examples because I understand the concept after a single example. I know none of these languages, but I'm familiar with other functional languages and many of the concepts. I was able to pick up on the syntax of these languages, but it would be much easier if one language was used throughout. Sometimes it feels that the author is either teaching/advertising the languages, or just plain trying to show off.
I don't think this book presents anything new. It's a decent introduction to the high-level concepts for someone completely unfamiliar with the functional paradigm, but you can safely skip most of the examples.
I had to subtract a star because I have the Kindle edition and none of the figures are rendered. I haven't felt that I've missed any content because of this, but it sure is annoying. The code samples are all there, even though the rendering quality is pretty low.
Sidenote: One reviewer asserts that the author is confused and perhaps lacks knowledge. I don't know Neal Ford, but I am very familiar with the output of the company at which he works - ThoughtWorks. I can say for certain that anyone employed by them for years is certainly knowledgeable about software engineering, particularly when it comes to real-world usage.
Why did I find the book so valuable?
* As you can see from the [hosted code](https://github.com/oreillymedia/functional_thinking), Ford accompanies all of his code examples with unit tests, which I find essential for understanding and trust.
* Most examples are done in Clojure (a LISP variant for the JVM), Groovy (a dynamic JVM language), **and** Java 8 (sometimes using the Functional Java library), as well as a number in Scala. I find that comparisons between languages improve my learning and retention, in addition to giving extra perspective.
* Ford guides the reader through the mix of terminology for the essential FP functions and how they differ by language: map (when it is called 'collect' and why; a.k.a select), reduce (when it is called 'collect'; plus how it differs from fold), and filter (a.k.a. where).
* All concepts are followed by (or introduced with) example code - this is not just a theory book.
* Some Design Patterns are reviewed and translated to their FP equivalents, which are often simpler.
* He provides the best explanation of recursion I've ever read:
"In reality, [recursion is] a computer-sciencey way to iterate over things by calling the same method from itself, reducing the collection each time, and always carefully ensuring you have an exit condition. Many times, recursion leads to easy-to-understand code because the core of your problem is the need to do the same thing over and over to a diminishing list."
* Ford also provides a helpful explanation of Currying vs partial application (better in context, but here is the crux):
"Currying describes the conversion of a multi-argument function into a chain of single-argument functions. It describes the transformation process, not the invocation of the converted function. The caller can decide how many arguments to apply, thereby creating a derived function with that smaller number of arguments. Partial application describes the conversion of a multi-argument function into one that accepts fewer arguments, with values for the elided arguments supplied in advance. The technique’s name is apt: it partially applies some arguments to a function, returning a function with a signature that consists of the remaining arguments. With both currying and partial application, you supply argument values and return a function that’s invokable with the missing arguments. But currying a function returns the next function in the chain, whereas partial application binds argument values to values that you supply during the operation, producing a function with a smaller arity (number of arguments). This distinction becomes clearer when you consider functions with arity greater than two. For example, the fully curried version of the process(x, y, z) function is process(x)(y)(z)"
There were times that I skimmed through sections (particularly the ones heavy on a Java implementation of pattern matching), but overall I was extremely pleased with the content.
Top reviews from other countries
The book gives plenty of examples to show how popular jvm languages (groovy, clojure, scala) give you the needed tools to start thinking differently at the way you program. In each chapter the author goes to some length to explain what's the reasoning behind those modeling choices, building a step by step understanding of what's generally considered the functional way.
Really recommended if you know java and want to introduce a new way to approach programming to your baggage.
There is quite a lot of focus on syntax since almost every example is shown in three different languages (java, groovy, scala/clojure) and the differences between the syntax explained over and over. Groovy specific constructs are discussed frequently and the author openly admits that many of these have nothing to do with FP.
The book ends with a ramble about metaprogramming, build systems and a couple of paragraphs on building functional architectures.