ݺߣ

ݺߣShare a Scribd company logo
Leonardo Amarilho
Fundamentals
The objective of the design of a
Functional Programming is to mimic
mathematical functions to the
greatest extend possible.
The basic process of computation is
fundamentally diferent in a functional
than in an imperative language.
Object-Oriented
Programming

Functional
Programming
How I will compare?
OO Building Blocks
●
●
●
●

Object
Encapsulation
Polymorphism
Inheritance
Functional Building Blocks
●
●
●
●
●

Functions
Higher-order functions
Immutable
Recursion
Lazy evaluation
OO Style
int total = 0;
for elem in elems{
total++;
}
return total;
Functional Style

(0...10).sum
Benefits
●
●
●
●

Easier to reuse and test;
Good for concurrency;
No side-effects;
Immutability;

More Related Content

Functional - Fundamentals and Perspective Functional vs OO