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 programmingDiscover how FP is more concise and modular than OOPGet useful FP lessons for your Java type design such as avoiding nullsDesign data structures and algorithms using functional programming principlesWrite concurrent programs using the Actor model and software transactional memoryUse functional libraries and frameworks for Java and learn where to go next to deepen your functional programming skills"
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
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...
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?
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.
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 !
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.
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.
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.
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.
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.
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.