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.
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).
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.
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.
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.
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.
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.
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."
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.
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. :)
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.
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.