DEV Community

Discussion on: Imperative vs Declarative programming. Your enemy is not object-oriented programming.

Collapse
 
andrewtrefethen profile image
AndrewTrefethen

Declarative is something to strive for, but it is a matter or degree. Even "Declarative" languages can get very imperative in practice if the model is ill-fitted to the problem. You start applying multiple transformations in order to get the desired result. So the main difference between declarative and imperative is how your abstraction fits your problem.

Collapse
 
frankfont profile image
Frank Font

Yes that!: "how well your abstraction fits the problem"

When the fit is bad the declarations will break down if they even work at all.

Fitting abstractions is a fun to pic and a worthwhile one too.