Synopses & Reviews
Synopsis
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 statement: 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
- Writing code that's easier to read and reason about
- Safer concurrent and parallel programming
- Handling errors without exceptions
- Java 8 features like lambdas, method references, and functional interfaces
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
- What is functional programming?
- Using functions in Java
- Making Java more functional
- Recursion, corecursion, and memoization
- Data handling with lists
- Dealing with optional data
- Handling errors and exceptions
- Advanced list handling
- Working with laziness
- More data handling with trees
- Solving real problems with advanced trees
- Handling state mutation in a functional way
- Functional input/output
- Sharing mutable state with actors
- Solving common problems functionally
Synopsis
DESCRIPTION
Functional programming is a deep and potentially mind-bending
discipline. Fortunately, Java developers don't have to master every
aspect of FP to get a big boost in the performance, readability, and
maintainability of their applications. By learning a few core FP
principles, they can write code that's less prone to side effects and
unwanted dependencies and which is much better suited to the parallel
processing required by modern multi-core and distributed systems. Also,
because units of functional code are designed to be modular and
independent, FP reduces or eliminates many of the bugs development
teams routinely face when managing a large codebase.
Functional Programming in Java teaches Java developers how to
incorporate the most powerful benefits of functional programming into
new and existing Java code. Written to meet the needs of professional
Java developers who want to introduce functional programming
principles into new and legacy projects, this book uses examples,
exercises, and illustrations to teach core FP principles such as referential
transparency, immutability, persistence, and laziness. They'll discover
which of the new functionally-inspired features of Java 8 will help in
applying FP principles to code--as well as which to avoid. In the end,
they'll be able to think functionally about coding tasks in Java and use
FP to make their applications easier to understand, optimize, maintain,
and scale.
KEY FEATURES
- Increases productivity
- Easy to grasp examples and illustrations
- Written for professional Java developers
AUDIENCE
Readers need to be comfortable with Java programming. No previous
experience with functional programming is required.
ABOUT THE TECHNOLOGY
Functional programming is gaining momentum, mainly through adoption of
new languages such as Scala, Clojure or Groovy, and through the new
popularity of older languages such as Haskell or Erlang. And functional
programming is coming to Java 8 with the addition of features such as
lambda expressions, and Streams.