Jump to ratings and reviews
Rate this book

Functional Programming for Java Developers: Tools for Better Concurrency, Abstraction, and Agility

Rate this book
Software development today is embracing functional programming (FP), whether it's for writing concurrent programs or for managing Big Data. Where does that leave Java developers? This concise book offers a pragmatic, approachable introduction to FP for Java developers or anyone who uses an object-oriented language.

Dean Wampler, Java expert and author of Programming Scala (O'Reilly), shows you how to apply FP principles such as immutability, avoidance of side-effects, and higher-order functions to your Java code. Each chapter provides exercises to help you practice what you've learned. Once you grasp the benefits of functional programming, you’ll discover that it improves all of the code you write.

Learn basic FP principles and apply them to object-oriented programming
Discover how FP is more concise and modular than OOP
Get useful FP lessons for your Java type design—such as avoiding nulls
Design data structures and algorithms using functional programming principles
Write concurrent programs using the Actor model and software transactional memory
Use functional libraries and frameworks for Java—and learn where to go next to deepen your functional programming skills

86 pages, Paperback

First published January 1, 2011

11 people are currently reading
101 people want to read

About the author

Dean Wampler

8 books21 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
10 (7%)
4 stars
36 (28%)
3 stars
61 (48%)
2 stars
16 (12%)
1 star
3 (2%)
Displaying 1 - 17 of 17 reviews
Profile Image for Jeanne Boyarsky.
Author 28 books76 followers
September 8, 2018
I saw “Functional Programming for Java Developers” at the public library. The book is from 2011 which means it proceeded lambdas/streams in Java 8. So I was curious what the book was about. Also, it is a short book – 60 pages plus an 8 page glossary. So either way, it would be a short read.

In chapter 1, it talks about the proposed Java 8 syntax. Which is different from how the language turned out. That's the only chapter that has a language version dependency.

Chapter 2 is an excellent intro or review of concepts. The book continues to talk about functional APIs; including fold which hasn't made it into core Java yet. Later in the book, there is a brief intro to Akka actors.

Overall, it was a good short read. And not obsolete
Profile Image for Alex Ott.
Author 3 books207 followers
August 7, 2011
This book tries to explain functional programming's concepts in simple language, using Java to illustrate them (although this isn't best language to do this). Book provides overview of main concepts & approaches, and tries to explain when functional approaches are better than "standard" object-oriented (for example, for concurrent programs)...

I will use this book to convince our Java & C++ developers to look onto world of functional programming, and although they probably won't switch to functional languages, I hope, that functional approaches, such as immutability, will help them to build better software...
Profile Image for Zhi Han.
74 reviews13 followers
October 24, 2014
If you want to learn and apply functional programming in Java, you should probably learn guava or other similar libraries. They did a much better job in explaining ideas and provide real tools for you to use. I feel the author seemingly has good intention: to introduce some flavor of FP to java programmers, but lack the time or effort to actually do it. The book frequently refer to other language features and refer to Scala and Akka when details are needed. It does not feel convincing or committed to Java language at all. If the author is already convinced that Java will be superseded by these other language, why bother to write a book just to tease the reader to his other books?
Profile Image for Georgi.
45 reviews
March 25, 2012
Having some humble experience in the area (mainly from the university), I expected to see some advanced FP concepts applied in Java. Instead, most of the book is a very basic tutorial. Additionally, it seems that (even with the new lambda syntax) Java blows for functional programming. The moral of the story, and the (not so) hidden message in the book, is that you should try Scala, Clojure or even JRuby, if you want bearable experience with FP on the JVM. Nevertheless, the book covers some interesting topics like actors and a comparison between functional and object-oriented programming.
3 reviews1 follower
August 9, 2011
The book is good for all the people who have never got in touch with functional programming and have always worked mostly with object-oriented languages. The main terms and the basic features are explained in a good and understandable way and the examples are really good, too. It's can be read in a single night, so try it !
Profile Image for Mike Arvela.
174 reviews12 followers
February 5, 2012
I feel like I still don't have a clue about what real functional programs look like. A nice and easy read, though.
Profile Image for Arun.
211 reviews67 followers
January 24, 2018
Nice sampler of functional programming concepts using a language that is not well suited for it (but Java 8 and above makes it more palatable).
The benefits of FP given are a bit hand wavy .
Exercises are thought provoking but has no solutions given either in the book or at the book site.
Profile Image for Victor Osorio.
Author 10 books3 followers
September 2, 2021
Quer conhecer o básico de programação funcional? Leia! Quer se aprofundar? Escolha outro título. Ele é recomendável para que quer construir bibliotécas funcionais em Java, visto que é anterior a várias funcionalidades como Streams.

57 reviews12 followers
August 22, 2012
My own thoughts echo other reviewers of this book. While it's potentially useful for getting Java devs to think more functionally, the end results look unreadable to most Java devs. It's shoehorning an alien concept (for now) into the language. Sure, you can kind of sort of do it, but should you?

I've implemented a number of "functional esque" methods in my current work project (independent of this book, but similar end results), and I wouldn't argue that the basic forms are more concise or more readable. Once you get into the equivalent of higher-order functions, there's more power available for less code, but it still looks clunky.
13 reviews
September 4, 2015
I really wonder what purpose this book serves. In my opinion this book was all over the place.

I was expecting to see examples in Java lambdas, however it had some convoluted examples in pre-Java 8 code.

He touches on a new FP concept, but then without explaining it in detail, he moves on to something else.

If you want to learn FP concepts or FP in Java, there are plenty of other books.

The good thing I found in this book is, it has only 88 pages.
Profile Image for Patrik Gustafsson.
169 reviews7 followers
January 10, 2012
I like that is: How to code functional with java! I thought it was an introduction to scala or another functional language presented in a way easy to understand by a java dev. But this is much better.
Profile Image for Daniel Cukier.
35 reviews13 followers
August 4, 2013
This book does a good job on explaining basic functional programming concepts to Java programmers. For those who never saw FP, I really recommend this book. It is short and straight forward, so it is worth the time reading it.
Profile Image for Isidro López.
152 reviews27 followers
May 24, 2016
Good intentions, but from my point of view, poor resolution.
I didn't find it specially pedagogical, I missed deeper explanations, more clear examples, etc.
Sorry to say that I wouldn't recommend it.
Profile Image for Adolfo.
26 reviews2 followers
January 6, 2017
Nice insights for developers used to Object Oriented Programming.
Displaying 1 - 17 of 17 reviews

Can't find what you're looking for?

Get help and learn more about the design.