Chapter 18. Thinking functionally

This chapter covers

  • Why functional programming?
  • What defines functional programming?
  • Declarative programming and referential transparency
  • Guidelines for writing functional-style Java
  • Iteration versus recursion

You’ve seen the term functional quite frequently throughout this book. By now, you may have some ideas about what being functional entails. Is it about lambdas and first-class functions or about restricting your right to mutate objects? What do you achieve from adopting a functional style?

In this chapter, we shed light on the answers to these questions. We explain what functional programming is and introduce some of its terminology. First, we examine the concepts behind functional programming—such ...

Get Modern Java in Action now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.