declarative programming

A style of programming where you describe the result you want and let the system work out the steps, rather than giving each step yourself.

In more detail

SQL queries, HTML and configuration files are declarative. The system chooses the steps, which leaves less room for ordering mistakes.

Example

In React you write what the UI should look like for the current state, and React decides which DOM operations to perform.

Related terms

Taught in

References