Category:Declarative paradigm
Jump to navigation
Jump to search
A declarative language is any language with a semantics [which] has some nontrivial existential quantifiers in it. ~ Neel Krishnaswami[1]
In the declarative paradigm, a programming language's design includes a search over possible details. While individual programs may declare structures and behaviors, they are expressed with limited or no control over the underlying search formalism. The declarative paradigm is often contrasted with a complementary imperative paradigm in which the programmer has complete control over the sequences of instructions executed by a machine.
Common examples of the declarative paradigm include:
- Parsing formalisms: regular expressions, context-free grammars
- Database query languages with query planning, particularly flavors of SQL
- Logic programming languages like Prolog
- Constraint-based languages: CHR, CSS
In contrast, the following examples are not declarative:
- Lambda calculus with a fixed evaluation strategy like call-by-need or call-by-value
- Domain-theoretic languages like Haskell with a fixed evaluation strategy
- Domain-specific languages without search, like languages that solve the FizzBuzz problem
References
- ↑ N. Krishnaswami, 2013. What declarative languages are. https://semantic-domain.blogspot.com/2013/07/what-declarative-languages-are.html
Pages in category "Declarative paradigm"
The following 79 pages are in this category, out of 79 total.