Functional Programming Languages provide 2 main features:
Pure functions without any side-effect
What do these two features lead to
- First class functions
- which means functions are first-class citizens.
- functions can be assigned to variables
- functions can be stored in data structures
- functions can be passed to other functions as arguments
- functions can be returned from other functions
- Functions take values as parameters and return values.
- No global or mutable state.
- Localized thinking space
- Localized testing
- Control abstraction with higher order functions
- More readable & shorter code
- Higher order Functions leads to less branches and assignments, which in turn leads to readable, shorter code.
- Data abstraction with closures
- Concurrency - immutable data structures
- Simplifies programming. No need for complicated Object Oriented Design Patterns, which are required to solve problems that Object Orientation introduces.