O'Reilly logo

Functional Programming in Java: How functional techniques improve your Java programs by Pierre-Yves Saumont

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 1. What is functional programming?

This chapter covers

  • The benefits of functional programming
  • Problems with side effects
  • How referential transparency makes programs safer
  • Reasoning about programs with the substitution model
  • Making the most of abstraction

Not everybody agrees on a definition for functional programming (FP). In general terms, functional programming is a programming paradigm, and it’s about programming with functions. But this doesn’t explain the most important aspect: how FP is different from other paradigms, and what makes it a (potentially) better way to write programs. In his article “Why Functional Programming Matters,” published in 1990, John Hughes writes the following:

Functional programs contain no assignment ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required