Declarative Programming

Declarative programming is a programming style, where the goal of the task is described, but not the method to reach it. This is left to the source code to solve it in the way it sees fit.

Declarative programming is flexible in the way it expresses its requirements. It leaves room to optimization: as long as a step fulfills its mission, it may be used. On the other hand, several versions of the step may be created, with various optimisations. When several options are available, it requires a way to make a choice.

Documentation

See also Declarative Programming in PHP: A Comprehensive Overview and Comparison with Imperative Programming.

Related : Paradigm, Imperative Programming, Functional Programming, Procedural Programming