Java Reference
In-Depth Information
Chapter 9. Functional Programming
Techniques: Functional Interfaces,
Streams, Parallel Collections
Introduction
Java is an object-oriented (OO) language. You know what that is. Functional Programming
(FP) has been attracting attention lately. There may not be quite as many definitions of FP as
there are FP languages, but it's close. Wikipedia's definition of Functional Programming is
“… a programming paradigm, a style of building the structure and elements of computer pro-
grams, that treats computation as the evaluation of mathematical functions and avoids state and
mutable data. Functional programming emphasizes functions that produce results that depend
only on their inputs and not on the program state - i.e. pure mathematical functions. It is a de-
clarative programming paradigm, which means programming is done with expressions. In func-
tional code, the output value of a function depends only on the arguments that are input to the
function, so calling a function f twice with the same value for an argument x will produce the
same result f(x) both times. Eliminating side effects, i.e. changes in state that don't depend on
the function inputs, can make it much easier to understand and predict the behavior of a pro-
gram, which is one of the key motivations for the development of functional programming…”
http://bit.ly/1eUS2QP viewed December 2013
Search WWH ::




Custom Search