What is a unit in functional programming

Functional programming: explanation & example

Although the roots of functional programming go back to the 1930s (as part of basic mathematical research), the functional approach is still very popular, especially in the technical and mathematical fields. There are several reasons for this:

  • extensive possibilities for algebraic program transformation
  • extensive possibilities for algebraic program synthesis
  • simple semantic analysis options thanks to the waiver of "internal states in the calculation process" and "side effects".
  • Elimination of inner states: Unlike imperative programming, no internal states of a calculation process are required.
  • No side effects: The state changes associated with the internal states, the so-called side effects, can also be dispensed with in functional work.

Functional programming offers a high degree of abstraction because it is based on the mathematical concept and principle of function. When used properly, this type of programming leads to very precise code. A program for solving a significantly larger task is created from as many small, repeatedly usable and very specialized units, the functions, as possible.

So there are numerous practical reasons why functional programming and the functional programming languages ​​that work with this principle still occupy a special position within computer science, especially when it comes to complex mathematical tasks and Algorithms goes. At the same time, the very special areas of application ensure that functional programming languages ​​lead something of a niche existence.