WishWiki

Declarative programming

Declarative programming is a programming paradigm where you describe what you want to compute rather than how to compute it. Instead of writing step-by-step instructions, you declare desired outcomes, constraints, or rules—and let the system figure out the computational path.

A declarative approach contrasts sharply with imperative programming, which focuses on explicit commands and control flow. In declarative code, you might specify "find all users over 18" without detailing loops or conditionals. The underlying software engine handles the machinery.

Common declarative approaches include:

Declarative programming shines when readability and maintainability matter more than low-level control. It's especially powerful for integrating complex systems—think configuration files, UI frameworks like Elements, or probabilistic reasoning.

The trade-off: less control over performance details, but often cleaner, more expressive code.

Related

Functional programming, SQL, Logic programming, HTML, Constraint satisfaction, Epistemology

Wishing…
your wish is being written

✨ Wish for a new page

👁 Wish for another view of this page

Sign in to WishWiki

Keep your wishes together, see your activity — and later, get your own private wiki space.

⏱ Page history