What is procedural and non-procedural programming?

I read in this answer , but without much detail, that:

"[...] procedural programming is an evolution of programming structured [...]"

And in this answer also:

[...] procedural programming is something that, to some extent, inevitable [...]

And in Wikipedia says that:

[...] sometimes used as a synonym for Imperative Programming [...]

More what really is procedural and non-procedural programming?

Author: Maniero, 2017-04-04

1 answers

Is basically programming that structures execution through watertight routines that are called as needed. we usually call them functions, but it doesn't have to be exactly that form.

Normally these routines have parameters to communicate with the other parts of the code and can return some value, but it is not mandatory, although it is confusing to mix everything or powerless not to allow any communication.

Certainly a definition of this is not "a programming based on procedures (procedures)". Well, it is, but you have to be careful because the procedure is a routine watertight mechanism. One that is little used in most modern languages explicitly. Of course, a function that returns nothing (in general void) is still a procedure. The term procedural is used as a generic form.

As well as functional programming is not "the one that has functions", not least because if that were the case, almost every language would be functional.

The procedural paradigm is secondary and refers more to the organization of the code as a whole, as is object orientation.

The main thing that differs procedural from Object-Oriented is that the former glorifies the procedures, the behavior, and the latter glorifies the object, the state (curiously hiding them).

[...] procedural programming is an evolution of structured programming [...]

Structured programming is concerned only with the flow of code and not its compartmentalization.

[...] procedural programming is something that, to some extent, inevitable [...]

I do not agree that the use of procedural is inevitable. The imperative is almost inevitable. I speak this in What is paradigm?.

[...] sometimes used as a synonym for Imperative Programming [...]

Is mistakenly used as synonym for Imperative.

 7
Author: Maniero, 2020-05-12 14:01:43