# Declarative programming

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Declarative_programming
> Markdown URL: https://mediated.wiki/source/Declarative_programming.md
> Source: https://en.wikipedia.org/wiki/Declarative_programming
> Source revision: 1346018586
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

Programming paradigm based on modeling the logic of a computation

This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these messages) This article includes a list of general references, but it lacks sufficient corresponding inline citations. Please help to improve this article by introducing more precise citations. (April 2010) (Learn how and when to remove this message) This article needs additional citations for verification. Please help improve this article by adding citations to reliable sources. Unsourced material may be challenged and removed. Find sources: "Declarative programming" – news · newspapers · books · scholar · JSTOR (February 2015) (Learn how and when to remove this message) This article may need to be rewritten to comply with Wikipedia's quality standards. Relevant discussion may be found on the talk page. You can help. The talk page may contain suggestions. (December 2025) (Learn how and when to remove this message)

In [computer science](/source/Computer_science), **declarative programming** is a [programming paradigm](/source/Programming_paradigm) that expresses the logic of a [computation](/source/Computation) without describing its [control flow](/source/Control_flow).[1]

Many languages that apply this style attempt to minimize or eliminate [side effects](/source/Side_effect_(computer_science)) by describing *what* the program must accomplish in terms of the [problem domain](/source/Domain_knowledge), rather than describing *how* to accomplish it as a sequence of the programming [language primitives](/source/Language_primitive)[2] (the *how* being left up to the language's [implementation](/source/Programming_language_implementation)). This is in contrast with [imperative programming](/source/Imperative_programming), which implements [algorithms](/source/Algorithm) in explicit steps.[3][4]

Declarative programming often considers [programs](/source/Program_(machine)) as theories of a [formal logic](/source/Mathematical_logic#Formal_logical_systems), and computations as deductions in that logic space. Declarative programming may greatly simplify writing [parallel programs](/source/Parallel_computing).[5]

Common declarative languages include those of [database query languages](/source/Query_languages) (e.g., [SQL](/source/SQL), [XQuery](/source/XQuery)), [regular expressions](/source/Regular_expression), [logic programming](/source/Logic_programming) (e.g., [Prolog](/source/Prolog), [Datalog](/source/Datalog), [answer set programming](/source/Answer_set_programming)), [functional programming](/source/Functional_programming), [configuration management](/source/Configuration_management_database), and [algebraic modeling](/source/Algebraic_modeling_language) systems.

## Definition

Declarative programming is often defined as any style of programming that is not imperative. A number of other common definitions attempt to define it by simply contrasting it with imperative programming. For example:

- A high-level program that describes what a computation should perform.

- Any programming language that lacks [side effects](/source/Side_effect_(computer_science)), or more specifically, has [referential transparency](/source/Referential_transparency).

- A language with a clear correspondence to [mathematical logic](/source/Mathematical_logic).[6]

These definitions overlap substantially.[*[citation needed](https://en.wikipedia.org/wiki/Wikipedia:Citation_needed)*]

Declarative programming is a non-imperative style of programming in which programs describe their desired results without explicitly listing commands or steps that must be performed. Logic programming languages are characterized by a mostly declarative programming style. In logic programming, programs consist of sentences expressed in logical form, and computation uses those sentences to solve problems, which are also expressed in logical form.

In a [pure functional language](/source/Pure_functional_language), such as [Haskell](/source/Haskell), all functions are [without side effects](/source/Pure_function), and state changes are only represented as functions that transform the state, which is explicitly represented as a [first-class](/source/First-class_citizen) object in the program. Although pure functional languages are non-imperative, they often provide a facility for describing the effect of a function as a series of steps. Other functional languages, such as [Lisp](/source/Lisp_(programming_language)), [OCaml](/source/OCaml) and [Erlang](/source/Erlang_(programming_language)), support a mixture of procedural and functional programming.[*[citation needed](https://en.wikipedia.org/wiki/Wikipedia:Citation_needed)*]

Some logic programming languages, such as [Prolog](/source/Prolog), and database query languages, such as SQL, while declarative in principle, also support a procedural style of programming.[*[citation needed](https://en.wikipedia.org/wiki/Wikipedia:Citation_needed)*]

## Subparadigms

Declarative programming is an [umbrella term](/source/Umbrella_term) that includes a number of better-known [programming paradigms](/source/Programming_paradigm).

### Constraint programming

Further information: [Constraint programming](/source/Constraint_programming)

Constraint programming states relations between variables in the form of constraints that specify the properties of the target solution. The set of constraints is [solved](/source/Solver_(computer_science)) by giving a value to each variable so that the solution is consistent with the maximum number of constraints. Constraint programming often complements other paradigms: functional, logical, or even imperative programming.

### Domain-specific languages

Further information: [Domain-specific language](/source/Domain-specific_language)

Well-known examples of declarative domain-specific languages (DSLs) include the [yacc](/source/Yacc) parser generator input language, [QML](/source/QML), the [Make](/source/Make_(software)) build specification language, [Puppet](/source/Puppet_(software))'s configuration management language, [regular expressions](/source/Regular_expression), [Datalog](/source/Datalog), [answer set programming](/source/Answer_set_programming) and a subset of [SQL](/source/SQL) (SELECT queries, for example). DSLs have the advantage of being useful while not necessarily needing to be [Turing-complete](/source/Turing-complete), which makes it easier for a language to be purely declarative.

Many markup languages such as [HTML](/source/HTML), MXML, [XAML](/source/XAML), [XSLT](/source/XSLT) or other [user-interface markup languages](/source/User-interface_markup_language) are often declarative. HTML, for example, only describes what should appear on a webpage - it specifies neither [control flow](/source/Control_flow) for rendering a page nor the page's possible [interactions with a user](/source/Human-computer_interaction).

As of 2013[\[update\]](https://en.wikipedia.org/w/index.php?title=Declarative_programming&action=edit), some software systems[*[which?](https://en.wikipedia.org/wiki/Wikipedia:Avoid_weasel_words)*] combine traditional user-interface markup languages (such as HTML) with declarative markup that defines what (but not how) the [back-end](/source/Frontend_and_backend) server systems should do to support the declared interface. Such systems, typically using a domain-specific [XML namespace](/source/XML_namespace), may include abstractions of SQL database syntax or parameterized calls to web services using [representational state transfer](/source/Representational_state_transfer) (REST) and [SOAP](/source/SOAP).[*[citation needed](https://en.wikipedia.org/wiki/Wikipedia:Citation_needed)*]

### Functional programming

Further information: [Functional programming](/source/Functional_programming)

Functional programming languages such as [Haskell](/source/Haskell), [Scheme](/source/Scheme_(programming_language)), and [ML](/source/ML_(programming_language)) evaluate expressions via function application. Unlike the related but more imperative paradigm of [procedural programming](/source/Procedural_programming), functional programming places little emphasis on explicit sequencing. Instead, computations are characterised by various kinds of recursive [higher-order function](/source/Higher-order_function) application and [composition](/source/Function_composition_(computer_science)), and as such can be regarded simply as a set of mappings between [domains](/source/Domain_of_a_function) and [codomains](/source/Codomain). Many functional languages, including most of those in the ML and Lisp families, are not [purely functional](/source/Purely_functional_programming), and thus allow introducing [stateful effects](/source/Side_effect_(computer_science)) in programs.

### Hybrid languages

See also: [Multi-paradigm programming language](/source/Multi-paradigm_programming_language)

Makefiles, for example, specify dependencies in a declarative fashion,[7] but include an imperative list of actions to take as well. Similarly, yacc specifies a context free grammar declaratively, but includes code snippets from a host language, which is usually imperative (such as [C](/source/C_(programming_language))).

### Logic programming

Further information: [Logic programming](/source/Logic_programming)

Logic programming languages, such as [Prolog](/source/Prolog), [Datalog](/source/Datalog) and [answer set programming](/source/Answer_set_programming), compute by proving that a goal is a logical consequence of the program, or by showing that the goal is true in a model defined by the program. Prolog computes by reducing goals to subgoals, top-down using [backward reasoning](/source/Backward_chaining), whereas most Datalog systems compute bottom-up using [forward reasoning](/source/Forward_chaining). Answer set programs typically use [SAT solvers](/source/Boolean_SAT_solver) to generate a model of the program.

### Modeling

Further information: [Mathematical model](/source/Mathematical_model)

Models, or mathematical representations, of physical systems may be implemented in computer code that is declarative. The code contains a number of equations, not imperative assignments, that describe ("declare") the behavioral relationships. When a model is expressed in this formalism, a computer is able to perform algebraic manipulations to best formulate the solution algorithm. The mathematical causality is typically imposed at the boundaries of the physical system, while the behavioral description of the system itself is declarative or acausal. Declarative [modeling languages](/source/Modeling_language) and environments include [Analytica](/source/Analytica_(software)), [Modelica](/source/Modelica) and [Simile](https://en.wikipedia.org/w/index.php?title=Simile_(computing)&action=edit&redlink=1).[8]

## Examples

### ML

[ML](/source/ML_(programming_language)) (1973)[9] stands for *Meta Language*. ML is statically typed, and function arguments and return types may be annotated.[10]

fun times_10(n : int) : int = 10 * n;

*ML* is not as bracket-centric as *Lisp*, and instead uses a wider variety of syntax to codify the relationship between code elements, rather than appealing to list ordering and nesting to express everything. The following is an application of times_10:

times_10 2

It returns "20 : int", that is, 20, a value of type int.

Like *Lisp*, *ML* is tailored to process lists, though all elements of a list must be the same type.[11]

### Prolog

[Prolog](/source/Prolog) (1972) stands for "PROgramming in LOGic." It was developed for natural language [question answering](/source/Question_answering),[12] using SL resolution[13] both to deduce answers to queries and to parse and generate natural language sentences.

The building blocks of a Prolog program are *facts* and *rules*. Here is a simple example:

cat(tom).                        % tom is a cat
mouse(jerry).                    % jerry is a mouse

animal(X) :- cat(X).             % each cat is an animal
animal(X) :- mouse(X).           % each mouse is an animal

big(X)   :- cat(X).              % each cat is big
small(X) :- mouse(X).            % each mouse is small

eat(X,Y) :- mouse(X), cheese(Y). % each mouse eats each cheese
eat(X,Y) :- big(X),   small(Y).  % each big being eats each small being

Given this program, the query eat(tom,jerry) succeeds, while eat(jerry,tom) fails. Moreover, the query eat(X,jerry) succeeds with the answer substitution X=tom.

Prolog executes programs top-down, using [SLD resolution](/source/SLD_resolution) to [reason backwards](/source/Backward_chaining), reducing goals to subgoals. In this example, it uses the last rule of the program to reduce the goal of answering the query eat(X,jerry) to the subgoals of first finding an X such that big(X) holds and then of showing that small(jerry) holds. It repeatedly uses rules to further reduce subgoals to other subgoals, until it eventually succeeds in [unifying](/source/Unification_(computer_science)#Application:_unification_in_logic_programming) all subgoals with facts in the program. This backward reasoning, goal-reduction strategy treats rules in logic programs as procedures, and makes Prolog both a declarative and [procedural programming](/source/Procedural_programming#Logic_programming) language.[14]

The broad range of Prolog applications is highlighted in the Year of Prolog Book,[15] celebrating the 50 year anniversary of Prolog.

### Datalog

The [origins of Datalog](/source/Datalog#History) date back to the beginning of logic programming, but it was identified as a separate area around 1977. [Syntactically and semantically](/source/Syntax_and_semantics_of_logic_programming), it is a subset of Prolog. But because it lacks [compound terms](/source/Prolog#Data_types), it is not [Turing-complete](/source/Turing_completeness).[*[citation needed](https://en.wikipedia.org/wiki/Wikipedia:Citation_needed)*]

Most Datalog systems execute programs bottom-up, using rules to [reason forwards](/source/Forward_chaining), deriving new facts from existing facts, and terminating when there are no new facts that can be derived, or when the derived facts unify with the query.[*[citation needed](https://en.wikipedia.org/wiki/Wikipedia:Citation_needed)*]

Datalog has been applied to such problems as [data integration](/source/Data_integration), [information extraction](/source/Information_extraction), [networking](/source/Computer_network), [security](/source/Security), [cloud computing](/source/Cloud_computing) and [machine learning](/source/Machine_learning).[16][17]

### Answer set programming

[Answer set programming](/source/Answer_set_programming) (ASP) evolved in the late 1990s, based on the [stable model](/source/Stable_model_semantics) (answer set) semantics of logic programming. Like Datalog, it is a subset of Prolog; and, because it lacks compound terms, it is not Turing-complete.

Most implementations of ASP execute a program by first *grounding* the program, replacing all variables in rules by constants in all possible ways, and then using a propositional SAT solver, such as the [DPLL algorithm](/source/DPLL_algorithm) to generate one or more models of the program.

Its applications are oriented towards solving difficult [search problems](/source/Search_algorithm) and [knowledge representation](/source/Knowledge_representation).[18][19]

## See also

- [Inductive programming](/source/Inductive_programming)

- [List of declarative programming languages](/source/List_of_programming_languages_by_type#Declarative_languages)

## References

1. **[^](#cite_ref-1)** Lloyd, J.W. (September 19–22, 1994). ["Practical Advantages of Declarative Programming"](https://www.programmazionelogica.it/wp-content/uploads/2015/12/GP1994-I-000-031.pdf) (PDF). In Alpuente, María; Barbuti, Roberto; Ramos, Isidro (eds.). *GULP-PRODE'94 1994 Joint Conference on Declarative Programming*. Vol. I. [Peñíscola](/source/Pe%C3%B1%C3%ADscola), Spain. pp. 3–17.

1. **[^](#cite_ref-FOLDOC_2004_2-0)** ["declarative language"](https://foldoc.org/declarative+language). *FOLDOC*. 17 May 2004. [Archived](https://web.archive.org/web/20230907151526/https://foldoc.org/declarative+language) from the original on 7 September 2023. Retrieved 7 September 2023.

1. **[^](#cite_ref-Sebesta_2016_3-0)** Sebesta, Robert (2016). *Concepts of programming languages*. Boston: Pearson. [ISBN](/source/ISBN_(identifier)) [978-0-13-394302-3](https://en.wikipedia.org/wiki/Special:BookSources/978-0-13-394302-3). [OCLC](/source/OCLC_(identifier)) [896687896](https://search.worldcat.org/oclc/896687896).

1. **[^](#cite_ref-4)** ["Imperative programming: Overview of the oldest programming paradigm"](https://www.ionos.com/digitalguide/websites/web-development/imperative-programming/). *IONOS Digital Guide*. 2021-05-21. [Archived](https://web.archive.org/web/20220503083342/https://www.ionos.com/digitalguide/websites/web-development/imperative-programming/) from the original on 2022-05-03. Retrieved 2023-05-23.

1. **[^](#cite_ref-5)** ["DAMP 2009: Workshop on Declarative Aspects of Multicore Programming"](https://web.archive.org/web/20130913162703/http://www.cse.unsw.edu.au/~pls/damp09/). Cse.unsw.edu.au. 20 January 2009. Archived from [the original](http://www.cse.unsw.edu.au/~pls/damp09/) on 13 September 2013. Retrieved 15 August 2013.

1. **[^](#cite_ref-6)** Chakravarty, Manuel M. T. (14 February 1997). [*On the Massively Parallel Execution of Declarative Programs*](http://www.cse.unsw.edu.au/~chak/papers/diss.ps.gz) (Doctoral dissertation). [Technische Universität Berlin](/source/Technische_Universit%C3%A4t_Berlin). [Archived](https://web.archive.org/web/20150923211531/http://www.cse.unsw.edu.au/~chak/papers/diss.ps.gz) from the original on 23 September 2015. Retrieved 26 February 2015. In this context, the criterion for calling a programming language declarative is the existence of a clear, mathematically established correspondence between the language and mathematical logic such that a declarative semantics for the language can be based on the model or the proof theory (or both) of the logic.

1. **[^](#cite_ref-7)** ["An overview on dsls"](https://web.archive.org/web/20071023021126/http://phoenix.labri.fr/wiki/doku.php?id=an_overview_on_dsls). Archived from [the original](http://phoenix.labri.fr/wiki/doku.php?id=an_overview_on_dsls) on October 23, 2007.

1. **[^](#cite_ref-8)** ["Declarative modelling"](http://www.simulistics.com/tour/declarative.htm). Simulistics. [Archived](https://web.archive.org/web/20030811073949/http://www.simulistics.com/tour/declarative.htm) from the original on 11 August 2003. Retrieved 15 August 2013.

1. **[^](#cite_ref-Gordon1996_9-0)** [Gordon, Michael J. C.](/source/Michael_J._C._Gordon) (1996). ["From LCF to HOL: a short history"](http://www.cl.cam.ac.uk/~mjcg/papers/HolHistory.html). [Archived](https://web.archive.org/web/20160905201847/http://www.cl.cam.ac.uk/~mjcg/papers/HolHistory.html) from the original on 2016-09-05. Retrieved 2021-10-30.

1. **[^](#cite_ref-cpl_3rd-ch9-233_10-0)** Wilson, Leslie B. (2001). *Comparative Programming Languages, Third Edition*. Addison-Wesley. p. 233. [ISBN](/source/ISBN_(identifier)) [0-201-71012-9](https://en.wikipedia.org/wiki/Special:BookSources/0-201-71012-9).

1. **[^](#cite_ref-cpl_3rd-ch9-235_11-0)** Wilson, Leslie B. (2001). *Comparative Programming Languages, Third Edition*. Addison-Wesley. p. 235. [ISBN](/source/ISBN_(identifier)) [0-201-71012-9](https://en.wikipedia.org/wiki/Special:BookSources/0-201-71012-9).

1. **[^](#cite_ref-PrologHistory_12-0)** ["Birth of Prolog"](http://alain.colmerauer.free.fr/alcol/ArchivesPublications/PrologHistory/19november92.pdf) (PDF). November 1992. [Archived](https://web.archive.org/web/20150402111123/http://alain.colmerauer.free.fr/alcol/ArchivesPublications/PrologHistory/19november92.pdf) (PDF) from the original on 2015-04-02. Retrieved 2022-05-25.

1. **[^](#cite_ref-13)** Robert Kowalski; Donald Kuehner (Winter 1971). ["Linear Resolution with Selection Function"](http://www.doc.ic.ac.uk/~rak/papers/sl.pdf) (PDF). *Artificial Intelligence*. **2** (3–4): 227–260. [doi](/source/Doi_(identifier)):[10.1016/0004-3702(71)90012-9](https://doi.org/10.1016%2F0004-3702%2871%2990012-9). [ISSN](/source/ISSN_(identifier)) [0004-3702](https://search.worldcat.org/issn/0004-3702). [Archived](https://web.archive.org/web/20150923215814/http://www.doc.ic.ac.uk/~rak/papers/sl.pdf) (PDF) from the original on 2015-09-23. Retrieved 2023-08-13.

1. **[^](#cite_ref-14)** Robert Kowalski [Predicate Logic as a Programming Language](http://www.doc.ic.ac.uk/~rak/papers/IFIP%2074.pdf) [Archived](https://web.archive.org/web/20160207012437/http://www.doc.ic.ac.uk/~rak/papers/IFIP%2074.pdf) 2016-02-07 at the [Wayback Machine](/source/Wayback_Machine) Memo 70, Department of Artificial Intelligence, University of Edinburgh. 1973. Also in Proceedings IFIP Congress, Stockholm, North Holland Publishing Co., 1974, pp. 569-574.

1. **[^](#cite_ref-Prolog_Book_15-0)** Warren, D.S. (2023). "Introduction to Prolog". In Warren, D.S.; Dahl, V.; Eiter, T.; Hermenegildo, M.V.; Kowalski, R.; Rossi, F. (eds.). *Prolog: The Next 50 Years*. Lecture Notes in Computer Science (LNCS). Vol. 13900. Springer, Cham. pp. 3–19. [doi](/source/Doi_(identifier)):[10.1007/978-3-031-35254-6_1](https://doi.org/10.1007%2F978-3-031-35254-6_1). [ISBN](/source/ISBN_(identifier)) [978-3-031-35253-9](https://en.wikipedia.org/wiki/Special:BookSources/978-3-031-35253-9).

1. **[^](#cite_ref-16)** Huang, Shan Shan; Green, Todd J.; Loo, Boon Thau (June 12–16, 2011). [*Datalog and Emerging applications*](https://www.cs.ucdavis.edu/~green/papers/sigmod906t-huang.pdf) (PDF). SIGMOD 2011. Athens, Greece: Association for Computing Machinery. [ISBN](/source/ISBN_(identifier)) [978-1-4503-0661-4](https://en.wikipedia.org/wiki/Special:BookSources/978-1-4503-0661-4). [Archived](https://web.archive.org/web/20201022234145/https://www.cs.ucdavis.edu/~green/papers/sigmod906t-huang.pdf) (PDF) from the original on 2020-10-22. Retrieved 2023-08-13.

1. **[^](#cite_ref-17)** Mei, Hongyuan; Qin, Guanghui; Xu, Minjie; Eisner, Jason (2020). "Neural Datalog Through Time: Informed Temporal Modeling via Logical Specification". *Proceedings of ICML 2020*. [arXiv](/source/ArXiv_(identifier)):[2006.16723](https://arxiv.org/abs/2006.16723).

1. **[^](#cite_ref-18)** Baral, Chitta (2003). [*Knowledge Representation, Reasoning and Declarative Problem Solving*](https://archive.org/details/knowledgereprese00bara). Cambridge University Press. [ISBN](/source/ISBN_(identifier)) [978-0-521-81802-5](https://en.wikipedia.org/wiki/Special:BookSources/978-0-521-81802-5).

1. **[^](#cite_ref-19)** Gelfond, Michael (2008). ["Answer sets"](https://books.google.com/books?id=xwBDylHhJhYC&pg=PA285). In van Harmelen, Frank; Lifschitz, Vladimir; Porter, Bruce (eds.). *Handbook of Knowledge Representation*. Elsevier. pp. 285–316. [ISBN](/source/ISBN_(identifier)) [978-0-08-055702-1](https://en.wikipedia.org/wiki/Special:BookSources/978-0-08-055702-1). [as PDF](http://www.depts.ttu.edu/cs/research/krlab/pdfs/papers/gel07b.pdf) [Archived](https://web.archive.org/web/20160303231241/http://www.depts.ttu.edu/cs/research/krlab/pdfs/papers/gel07b.pdf) 2016-03-03 at the [Wayback Machine](/source/Wayback_Machine)

## External links

- Frans Coenen. [Characteristics of declarative programming languages](https://web.archive.org/web/20060424045449/http://www.csc.liv.ac.uk/~frans/OldLectures/2CS24/declarative.html#detail). 1999.

- [Robert Harper](/source/Robert_Harper_(computer_scientist)). - [What, If Anything, Is A Declarative Language?](https://existentialtype.wordpress.com/2013/07/18/what-if-anything-is-a-declarative-language/). 2013. - "[There Is Such A Thing As A Declarative Language, and It's The World's Best DSL](https://existentialtype.wordpress.com/2013/07/22/there-is-such-a-thing-as-a-declarative-language/)". 2013.

- Olof Torgersson. [A Note on Declarative Programming Paradigms and the Future of Definitional Programming](https://web.archive.org/web/20060330033506/http://www.cs.chalmers.se/~oloft/Papers/wm96/wm96.html). 1996.

v t e Programming paradigms Imperative Structured Jackson structures Block-structured Modular Non-structured Procedural Programming in the large and in the small Design by contract Invariant-based Nested function Object-oriented Class-based, Prototype-based, Object-based Agent Immutable object Persistent Uniform function call syntax Declarative Functional Recursive Anonymous function (Partial application) Higher-order Purely functional Total Strict GADTs Dependent types Functional logic Point-free style Expression-oriented Applicative, Concatenative Function-level, Value-level Monad Dataflow Flow-based Reactive (Functional reactive) Signals Streams Synchronous Logic Abductive logic Answer set Constraint (Constraint logic) Inductive logic Nondeterministic Ontology Probabilistic logic Query Domain- specific language (DSL) Algebraic modeling Array Automata-based (Action) Command (Spacecraft) Differentiable End-user Grammar-oriented Interface description Language-oriented List comprehension Low-code Modeling Natural language Non-English-based Page description Pipes and filters Probabilistic Quantum Scientific Scripting Set-theoretic Simulation Stack-based System Tactile Templating Transformation (Graph rewriting, Production, Pattern) Visual Concurrent, parallel Actor-based Automatic mutual exclusion Choreographic programming Concurrent logic (Concurrent constraint logic) Concurrent OO Macroprogramming Multitier programming Organic computing Parallel programming models Partitioned global address space Process-oriented Relativistic programming Service-oriented Structured concurrency Metaprogramming Attribute-oriented Automatic (Inductive) Dynamic Extensible Generic Homoiconicity Interactive Macro (Hygienic) Metalinguistic abstraction Multi-stage Program synthesis (Bayesian, by demonstration, by example, vibe coding) Reflective Self-modifying code Symbolic Template Separation of concerns Aspects Components Data-driven Data-oriented Event-driven Features Literate Roles Subjects Comparisons/Lists Comparison (multi-paradigm, object-oriented, functional), List (OO, by type)

v t e Types of programming languages Level Machine Assembly Compiled Interpreted Low-level High-level Very high-level Esoteric Generation First Second Third Fourth Fifth

Authority control databases International GND National United States France BnF data Spain Israel Other Yale LUX

---
Adapted from the Wikipedia article [Declarative programming](https://en.wikipedia.org/wiki/Declarative_programming) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Declarative_programming?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
