The idea behind functional programming

submited by
Style Pass
2021-07-07 16:30:03

Recently, we have discussed the idea of abstraction behind imperative programming. The very concept of having an abstraction is to make things more manageable. Besides, when we consider the evolution of programming languages, the imperative paradigm itself seems a very natural approach.

High-level languages implementing imperative abstractions allow managing code easily due to explicit commands modifying the state. However, there are also other approaches introducing distinct paths of programming. Thanks to artificially reducing the scope of the expression, various paradigms achieve different, more sophisticated advantages.

One of the most important approaches is declarative programming which, in short, defines a program as a set of constant declarations with logical relations that describe the computation logic. The vital thing is determining how the data flow through the program without modifying the external state and thus avoiding side effects in general.

The declarative paradigm is a perfect example of how giving away certain power of expression allows gaining specific features of a solution. For instance, when we implement our solution to a problem in a purely declarative manner, we may expect it to be easier to prove its correctness, run it independently in parallel, and scale up the solution.

Leave a Comment