The code creat in accordance with this method is comparable to a list of sequential instructions

In the recent past, many programmers us proc ural languages, now this approach is becoming history, it is remember when it is impossible to turn to object-orient programming. And it occupies a significant place in the imperative “ordering”. Declarative paradigm A variant of the programming paradigm that poses the question to the specialist “what is expect in the end?”. The computer independently sorts out ways to achieve the desir result.

When using this type

The programmer is requir to specify clear, detail criteria for the result. If the wording is vague, the computer will be forc to perform a lot gambling data japan of actions to achieve the goal. Let’s say the task is to assemble a desk, but there are no specifics on the details. As a result, a dining table can be assembl , then a computer table, and only then the task. For a computer, this is a completely normal approach, since the desir result has been achiev , but from the point of view of efficiency, the efforts and time have been spent irrationally.

special data

The declarative paradigm includes the following subtypes:

Logical programming, where the main emphasis is on mathematical solutions, proofs. The method facilitates the implementation of business how to be productive before tasks. For its effective use, it is necessary to translate the goals into the mathematical language plane. The scope of application is modeling of certain processes. Functional subtype – echoes the concept of a mathematical function, to a greater extent where the discussion is about data transformation.

What are programming paradigms? Image by katemangostar on Freepik

The main differences between the imperative and declarative paradigms The first consider variant of the programming paradigm is the material data creation by the developer of detail instructions that the computer must follow. The concept of “state” is us – an array of data at some point. In the second option, the specialist formulates the task and expects the final result without creating any action algorithms.

Scroll to Top