13.4 Functional Programming
Functional programming makes it possible to parameterize a behavior—a sorting method always works the same, but its behavior during comparisons is different. This parameterization is on a different abstraction level than just passing simple values.
13.4.1 Code = Data
When you hear the term data , you might first think of numbers, bytes, strings, or even complex objects with states. In this chapter, we’ll expand this view a little and direct it to program code. Java code, epitomized as a series of bytecodes, also consists of data.
Once you buy into this view that code equals data, then code can also be passed like data and can thus be transferred from one point to another, stored, and later referenced. This ...
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