Design patterns·Functional ideas that went mainstream
one version says what the result should be and the other lists the steps, and only one of them can be optimised for you.
Declarative vs imperative
Also calleddeclarative, imperative, what versus how
Imperative code specifies the steps; declarative code specifies the outcome and leaves the steps to something else — SQL, a build tool, a UI framework, a reconciliation loop. The gain is that the executor can change strategy without you rewriting anything; the loss is that you cannot see what it is doing when it is slow or wrong. Nearly every abstraction argument in this corpus is a version of this trade.