Functional Programming
What is it?
“Refactor what you know about programming”
Functional programming is just another paradigm of organising your existing variables, ifs, loops, namespaces, arrays, data structures etc., in a different way than OOP
Inspiration
From mathematical functions.
For a given input to a function, always produce the same output
Rules
- All functions must be Pure Functions
- All variables must be immutable
- The language should include appropriate bridges to perform operations side_effects
Languages
- Haskell
- Clojure
Advantages
- Useful for implementation of multi threaded program
See how category_theory relates to this