Preface
A mind that is stretched by a new experience can never go back to its old dimensions.
Oliver Wendell Holmes, Jr.
Developing software is quite a complex endeavor. As Java developers, we usually try to tame this complexity with object-oriented programming (OOP) as a metaphor to represent the things we are developing, such as data structures, and use a primarily imperative-focused coding style to handle our program’s state. Although OOP is a well-known and battle-tested approach to developing sensible software, not every problem is a good match for it. We might introduce a certain amount of unnecessary complexity by forcing OOP principles on every problem instead of using more appropriate tools and paradigms also available to us. The functional programming (FP) paradigm offers an alternative approach to solving problems.
Functional programming isn’t a new idea. In fact, it’s even older than object-oriented programming! It first appeared in the early years of computing, in the 1950s, in the Lisp1 programming language and has been used quite commonly in academia and niche fields. In recent years, however, there has been an increasing interest in functional paradigms.
Many new functional languages have emerged, and non-functional languages are including functional features to various degrees. The ideas and concepts behind FP are now adopted in almost every mainstream multiparadigm and general-purpose language, allowing us to use some form of functional programming regardless ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access