Skip to Content
Functional Programming for Java Developers
book

Functional Programming for Java Developers

by Dean Wampler
July 2011
Intermediate to advanced
90 pages
2h 19m
English
O'Reilly Media, Inc.
Content preview from Functional Programming for Java Developers

Chapter 2. What Is Functional Programming?

Functional programming, in its “purest” sense, is rooted in how functions, variables, and values actually work in mathematics, which is different from how they typically work in most programming languages.

Functional programming got its start before digital computers even existed. Many of the theoretical underpinnings of computation were developed in the 1930s by mathematicians like Alonzo Church and Haskell Curry.

In the 1930s, Alonzo Church developed the Lambda Calculus, which is a formalism for defining and invoking functions (called applying them). Today, the syntax and behavior of most programming languages reflect this model.

Haskell Curry (for whom the Haskell language is named) helped develop Combinatory Logic, which provides an alternative theoretical basis for computation. Combinatory Logic examines how combinators, which are essentially functions, combine to represent a computation. One practical application of combinators is to use them as building blocks for constructing parsers. They are also useful for representing the steps in a planned computation, which can be analyzed for possible bugs and optimization opportunities.

More recently, Category Theory has been a fruitful source of ideas for functional programming, such as ways to structure computations so that side effects like IO (input and output), which change the state of the “world,” are cleanly separated from code with no side effects.

A lot of the literature on functional ...

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.
Start your free trial

You might also like

Functional Programming in Java

Functional Programming in Java

Venkat Subramaniam
Learning Java Functional Programming

Learning Java Functional Programming

Richard M Reese, Richard M. Reese

Publisher Resources

ISBN: 9781449312657Supplemental ContentErrata