Jump to ratings and reviews
Rate this book

Functional Programming in Java: Harnessing the Power of Java 8 Lambda Expressions

Rate this book
Lambda expressions are lightweight, highly concise anonymous methods backed by functional interfaces in Java 8. You can use them to leap forward into a whole new world of programming in Java. With functional programming capabilities, which have been around for decades in other languages, you can now write elegant, concise, less error-prone code using standard Java. This book will guide you though the paradigm change, offer the essential details about the new features, and show you how to transition from your old way of coding to an improved style.

In this book you’ll see popular design patterns, such as decorator, builder, and strategy, come to life to solve common design problems, but with little ceremony and effort. With these new capabilities in hand, Functional Programming in Java will help you pick up techniques to implement designs that were beyond easy reach in earlier versions of Java. You’ll see how you can reap the benefits of tail call optimization, memoization, and effortless parallelization techniques.

Java 8 will change the way you write applications. If you’re eager to take advantage of the new features in the language, this is the book for you.

160 pages, ebook

First published March 6, 2013

41 people are currently reading
373 people want to read

About the author

Venkat Subramaniam

21 books71 followers
Dr. Venkat Subramaniam, founder of Agile Developer, Inc., has trained and mentored thousands of software developers in the US, Canada, Europe, and Asia. Venkat helps his clients effectively apply and succeed with agile practices on their software projects. He is a frequent invited speaker at international software conferences and user groups. He's author of .NET Gotchas (O'Reilly), coauthor of the 2007 Jolt Productivity award-winning book Practices of an Agile Developer (Pragmatic Bookshelf), and author of Programming Groovy (Pragmatic Bookshelf).

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
81 (35%)
4 stars
110 (48%)
3 stars
30 (13%)
2 stars
4 (1%)
1 star
2 (<1%)
Displaying 1 - 22 of 22 reviews
Profile Image for Shashwat Suman.
1 review2 followers
August 12, 2016
Best thing about the book is that whenever you feel you don't understand a segment, you can start reading in Venkat's enthusiastic accent.
Profile Image for Ármin Scipiades.
64 reviews4 followers
February 1, 2017
A good introduction to the basics of functional programming, attempting to show how adopting a more functional mindset can improve code quality. Aimed at people who'd really, really would like to be awesome hipster programmers, but are stuck with maintaining huge legacy enterprise Java applications. Aimed at programmers who are stuck in the imperative thinking drummed into their heads at the university and later at the job. So, aimed at people like me -.-

It's a nice introduction, made me realise just how little I know and understand, despite having dabbled in the functional Python. I guess a book that makes you go all "OMG I was going at it all wrong!!!" is pretty good. The examples are basic, sometimes too basic, but it did make me think.

Also, gotta love the guy's enthusiasm.
Profile Image for Murat.
15 reviews6 followers
July 14, 2019
I usually like the language of Mr. Subramaniam, however too much of a good thing could be a bad thing I guess. This book feels too verbose, I think it could easily be one third of its size.

Maybe beginners in Java would get more out of this book.
Profile Image for Luboš.
485 reviews57 followers
September 3, 2023
I like the Venkat`s style. If you do not know him yet, watch some of his speeches. I expected something more about functional programming, but the topic is limited by Java. It provides a nice overview from the very beginning. I was kindly surprised, that in Java, it is possible to achieve Tail-Call Optimization. Reading about error handling gave me a better understanding of Reactor Core API.
Profile Image for Henning Jansen.
6 reviews1 follower
July 16, 2018
Mr. Subramaniam is one of my all-times favourite computer science writers, and this book made sure he stays on that list. Sometimes the functional paradigm becomes overly eager. However, I assume that most readers of this book is familiar with the Publishers flagship title and apply caution (pragmatism) accordingly... Highly recommended.
Profile Image for Pradeep Sekar.
4 reviews
November 13, 2018
Best book to get a exposure to java 8 lambdas and their usage, including why to use them
Profile Image for Mihail Dilion.
16 reviews3 followers
March 2, 2024
This book is for people who just start looking toward ways of writing functional code in Java and will serve as a great introduction, it gives a good glimpse of possibilities and benefits FP can give if done right and couple examples of what happen when is done wrong.

For a more seasoned developer it most probably will not cause some revelations but still some interesting ideas could be found, for me such and idea was approach of combining multiple Function<>'s in a single one using .andThen() default method, getting at the end of pipeline a single function that could be applied, I've seen something like this previously but didn't dig into to understand better and it was nice to look into it, but still when it comes to more advanced books on lambdas, Streams and all new after Java 8 I would suggest Modern Java In Action

Overall I am not mad for spending time reading this book, It definitely was not what I was expecting but still decent.
15 reviews2 followers
August 30, 2018
The book can be a real eye opener for people who are completely new to functional paradigm. I was already somewhat familiar with Haskell and Racket so it wasn't that much that I learned about functional programming. But the real knowledge in that book is about how to effectively use lambdas to design APIs in enterprise applications. Also the book is short and concise. In author's words, "no ceremony, just essence."
2 reviews
August 13, 2024
I would say this book is blessing for one who wants to start on Java 8 functional style. Explanation is provided in simplistic manner with concise code examples each with imperative and functional style code.
Profile Image for Nazar.
63 reviews6 followers
April 1, 2018
Excellent book for understanding functional Java style.
It shows exactly right direction for functional Java usage with examples.
Profile Image for Alexandru Schiaucu.
17 reviews
July 31, 2019
Besides the new perspective offered in this book to look at Java 8 lambdas, the jokes are really well placed and have impact on the techie reader
Profile Image for Hà Bùi.
36 reviews14 followers
May 31, 2022
A good overview of lambda expressions and design pattern using lambda in Java 8
Profile Image for Hafiz Hussain.
89 reviews10 followers
December 31, 2023
The book is a little bit lengthy, IMO.
It is a great book. I would love to review Authors Pull Request or diffs, and I am sure that will be another source of learning for me. :)
Profile Image for David S. T..
127 reviews22 followers
July 24, 2014
I come from a background of 10 years of professional Java software development; with the introduction of Lambda functions, I figured now is the time to finally learn something about Functional Programming. I picked this book up because I liked Venkat's Scala videos and his IntelliJ Java 8 introduction video. Overall this book was good, it does a great job of teaching you the syntax for Lambda expressions and the new collections stream api, but after this book I don't feel that I really understand much more than the syntax. This book rarely seemed to ever get more in depth than his introduction video. Perhaps this was because I expected more out of this book than its intended purpose or because Java 8's functional elements are limited.
Profile Image for Miloš.
67 reviews3 followers
September 16, 2014
While the first few chapters' overly theatrical, simplistic and repetetive style really got on my nerves, later on the book starts providing both meaningful examples and practical advice, making it a good read after all (as was to be expected of Pragmatic Bookshelf ;)). All in all, a very nice introduction to functional programming with Java 8.
Profile Image for Bartek Piech.
26 reviews3 followers
April 4, 2014
Most important thing about this book is that it shows you how FP will improve design of your code and not only new features of Java 8.
37 reviews
June 22, 2014
Nice introduction to functional oriented Java 8 features.
Profile Image for Joseph.
129 reviews59 followers
April 19, 2015
Neat look into some of the FP stuff in 1.8.
Displaying 1 - 22 of 22 reviews

Can't find what you're looking for?

Get help and learn more about the design.