Imagine writing Java code that reads like the problem statement, code that's highly expressive, concise, easy to read and modify, and has reduced complexity. With the functional programming capabilities in Java, that's not a fantasy. This book will guide you from the familiar imperative style through the practical aspects of functional programming, using plenty of examples. Apply the techniques you learn to turn highly complex imperative code into elegant and easy-to-understand functional-style code. Updated to the latest version of Java, this edition has four new chapters on error handling, refactoring to functional style, transforming data, and idioms of functional programming. Don't struggle with the limitations of the imperative style; instead learn to combine object-oriented programming with the functional style to reduce the accidental complexity. Harness the functional programming capabilities of Java to create applications where the program reveals its intentions and your team can quickly understand and modify code to align with changing business requirements. Unlock the power of lambda expressions and the Streams API to turn the oft-written spaghetti code into highly concise, expressive, elegant, and maintainable code. See how Streams make the arduous task of parallelizing code as easy as flipping a switch when superior speed is necessary. Apply design patterns built around lambda expressions, safely manage resource allocations, use memoization, and learn to transform data into different forms, all while honoring immutability, and providing thread safety to leverage lazy evaluation for efficiency and parallel execution for performance. Move beyond the basics, explore the idioms for writing functional programs. Learn to think functionally by refactoring legacy code into the functional style. And, if your code runs aground due to failures, learn to properly handle errors the functional way. Don't drown in theory; instead learn the practical functional programming techniques to create superior Java code. What You Java version 8 or newer.
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.