Functional Programming

Computations are evaluation of mathematical functions.

  • Based on the above foundational statement.

💡Although, (mathematical) computations by nature are mathematical functions, so the above statement may sound self-referential. But, computations here mean execution of steps by a computer. These do involve evaluation of mathematical functions generically, but this aspect is more emphasized in functional programming.

Operating within these paradigm means enforcing practices which prioritize this aspect.

Functional programming implements concepts from Mathematical analysis.func (Private)tions in a way which avoid #surprises and promotes concise and readable code.

Foundational Principles

  1. Immutability
  2. Function Composition
  3. Recursion
  4. Lazy Evaluation

The declarative nature might seem like a simple syntatical sugar, functional programming shines by combining this declarative approach with other principles and features.

Additionally, passing functions as arguments ensures lazy evaluation. That is, the functions are not evaluated until their results are absolutely needed.

References


Backlinks