The document discusses the rise of functional programming. It provides an example comparing an imperative solution in Java to sum the ages of persons over 20 to a functional solution. The functional solution uses reduction and has no mutable state. Functional programming is described as writing what you want, not how to do it, with everything being a function. Benefits mentioned include stateless programming which aids reasoning, easy distribution and parallelism, and easier program proof. The document also briefly mentions functional languages like Haskell and Erlang, as well as Java's addition of lambda expressions in Java 8 to provide more functional capabilities.
Spark - The Ultimate Scala Collections by Martin Odersky
The Rise of Functional Programming
1. The rise of Functional
Programming
A short presentation by Tjerk Wolterink
2. Outline
Hands on
1. From Imperative to Functional
2. Java and Lambda
Theory
3. Referential Transparency
4. Higher Order Functions
5. Lazy Evaluation
6. Pattern Matching
7. Imperative Programming
● Thinks in terms of steps todo
● Time goes forward
● Mutable state
● Threads are needed to utilize multiple cores
● Concurrent Programming and Locking
13. Functional Programming
● Write what you want, not how to do it
● Everything is a function
● Stateless
○ No side effects, reasoning is easier
● Concurrency
○ Plays extremely nice with the rising multi-core
technology
○ Execute your program in a distributed network
○ Hadoop / Map Reduce
● Academia love it
○ Based on λ-Calculus and Rule Rewriting
○ Easier to prove programs correct
○ No state explosion
14. Functional Languages
Fully Functional
● Haskell, Lisp (from 1950!), Erlang
● XSLT, Clojure (VM Based)
Powerfull Functional Support
● Python, JavaScript, Scala (VM Based),
Groovy (VM Based)
Sort of Functional
● C++ function pointers
● C#
● Java Lambda
● Bash shell? ( ls | grep 'test' | more)
16. Java Lambda JSR-335
"Extend the Java language to support compact
lambda expressions (closures), as well as
related language and library features to enable
the Java SE APIs to use lambda expressions
effectively."