Since Java 8 code does not look like idiomatic code in more functional programming languages,
however, there is still much to be gained by learning those other functional programming languages. So
if learning a functional programming language is on your to-do list, stick with it. 19 When you do learn that
language, you will be introduced into its new ideas, and you will develop a new sense of what is natural.
What Java 8 allows you to do is to bring those new ideas and that new sensibility back into the Java world
without feeling constrained, or feeling like the language is getting in your way of doing what you want.
Java 8 does not make Java a “functional programming language.” It does allow you to more naturally
do functional programming in Java, however. Java 8 is a huge evolution of Java, making it a flexible and
multi-paradigm language, and it makes Java competitive with the other JVM programming language
forerunners such as Groovy, Scala, Ruby, and Clojure.
Enough with the Theory; onto the Implementation!
It is impressive just how naturally Java 8's lambdas fit into the Java syntax, and how easy they are to read.
This chapter took advantage of this fact to introduce lambdas informally and indirectly; we learned the
basics of lambdas gradually by comparing them to imaginary Java code and to legacy Java code. We also
spent a lot of time examining what lambdas are at a high level, and how they impact what kind of
language Java is.
In the next chapter, we will look into what lambdas are from a technical standpoint, both from the
standpoint of computer science theory, and from the standpoint of Java's implementation. We will expand
on our examples to see how we can perform even cooler stunts, and we will begin to interact with streams at
the most basic level in order to discover how they really work. In short, things are about to get real.
19 Might I suggest picking up OCaml over the course of an evening or two?