Jump to ratings and reviews
Rate this book

Functional Programming in Java: How functional techniques improve your Java programs

Rate this book
Summary

Functional Programming in Java teaches Java developers how to incorporate the most powerful benefits of functional programming into new and existing Java code. You'll learn to think functionally about coding tasks in Java and use FP to make your applications easier to understand, optimize, maintain, and scale.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

About the Technology

Here's a bold learn functional programming and you'll be a better Java developer. Fortunately, you don't have to master every aspect of FP to get a big payoff. If you take in a few core principles, you'll see an immediate boost in the scalability, readability, and maintainability of your code. And did we mention that you'll have fewer bugs? Let's get started!

About the Book

Functional Programming in Java teaches you how to incorporate the powerful benefits of functional programming into new and existing Java code. This book uses easy-to-grasp examples, exercises, and illustrations to teach core FP principles such as referential transparency, immutability, persistence, and laziness. Along the way, you'll discover which of the new functionally inspired features of Java 8 will help you most.

What's Inside


About the Reader

Written for Java developers with no previous FP experience.

About the Author

Pierre-Yves Saumont is a seasoned Java developer with three decades of experience designing and building enterprise software. He is an R&D engineer at Alcatel-Lucent Submarine Networks.

Table of Contents

472 pages, Paperback

Published January 27, 2017

20 people are currently reading
99 people want to read

About the author

Pierre-Yves Saumont

10 books5 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
9 (22%)
4 stars
17 (42%)
3 stars
11 (27%)
2 stars
2 (5%)
1 star
1 (2%)
Displaying 1 - 3 of 3 reviews
Profile Image for Miloš.
68 reviews3 followers
October 22, 2020
Having thoroughly enjoyed Martin Odersky's Functional Programming in Scala Coursera course I'm-too-embarrassed-to-say-exactly-how-many years ago, I thought this book could be the perfect refresher course for my current career path - developing Akka systems in Java. I expected so much more from this one, although I probably should have known better - there's rarely anyone better at promoting the potential ugliness of functional programming than people who are deeply in love with functional programming.

The book's biggest strength is that it is actually a compilation of brain-teasing exercises meant to illustrate functional programming concepts to Java developers.

The book's biggest flaw is that it is actually a compilation of brain-teasing exercises meant to illustrate functional programming concepts to Java developers - and not a book on how to write proper, clean and performant Java code using the functional programming paradigm.

But even in its biggest strength it is lacking - the exercises start to look alike after a while and become quite repetitive. Here and there between the solutions to the exercises the author will try to provide some advice to future FPs, often poorly worded or thought-through. Simply throwing around claims without showing anything to back them up left a very bad taste in my mouth. "Functional code can be proven to function correctly yet imperative code cannot." How? Why? Examples? Sources? "Chapter 5's functional immutable lists offering much better performance than Java lists!" Measured how? Which operations exactly, which access patterns? "You can write functional Java code without control structures by hiding them behind methods and pretending that made them disappear because I, the author, say so" The book is full of similar tiny offhand comments that kept me twitching...

And ho boy, the code! I get that the solution code is there only to illustrate the logic and train of thought that lead to the correct implementation but it proved to be all that I hear people complain about when doing function programming on the JVM - endless nested closures with one-letter variable names that can (almost) obscure even the most obvious of implementations... yes, I'm a textbook curmudgeon but surely the code could have been made more readable.

So, all in all, should people read the book? I guess a Java developer new to functional programming in general may get something out of it if they focus purely on doing the exercises but even so I'd advise checking if Coursera is still offering Functional Programming in Scala, it's a much better option.

Let me end the review with a haiku:
Profile Image for Tomáš.
305 reviews32 followers
April 30, 2018
Excellent book about functional programming in java.
So far I´ve encountered programming books explaining java with a little bit of ¨functional programming¨. This book is quite the opposite! You will barely recognize ¨standard constructs¨, because you´ll write your own Functions, Results, Lists, Trees, Optionals, Streams, Actors,... and use them in a functional way. I´ve already tried this in Scala with mixed feelings. Scala is so complex, because there is multiple ways how to do things. Java tries to (slowly) adopt only successful (popular) ideas, but the result is incomplete and laughable. This book clearly confirms this feeling.
I´m still surprised that I´ve not met functional programming during my university study, because it´s so rigorous, theoretical, simple but hard to understand. If I was a PhD. student looking for something to teach some computer-science undergraduates, I would pick up this book ;-)
It will probably not improve your java programs, as the subtitle of this book says, but it will definitely change the way you think, which is even more important.
54 reviews11 followers
June 25, 2018
avesome book about principles (rather than implementation details) of functional programing.
Some books concentrate on implementations (classes, methods). this book describes principles (immutability, no side effects) first, implementation details later.
It helped me greatly to understand functional programing and use it in my production code in java 8.
Displaying 1 - 3 of 3 reviews

Can't find what you're looking for?

Get help and learn more about the design.