Автор: Матюкевич Сергей




Imperative programming (С/C++, Java)
Declarative programming
◦ Functional programming (F#, Haskell, Scheme,
OCaml)
◦ Logic programming (Prolog, Clojure core.logic)





IP = computation in terms of statements that
change a program state
FP = computation as the evaluation of
mathematical functions and avoids state and
mutable data




Object oriented paradigm is better to
describe real world objects and their
relations.
Functional paradigm is better to describe
complicated algorithms.




Stateless
Immutable data





First-class functions
Higher-order functions
Pure functions




No loops
Recursion
Tail recursion






Declarative nature of function languages
Functional programs are easier to parallel (no
mutable data -> no need in locks)
Pure functions are easier to maintain and
understand

Functional programming