Category:Declarative paradigm

From Esolang
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:

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

  1. N. Krishnaswami, 2013. What declarative languages are. https://semantic-domain.blogspot.com/2013/07/what-declarative-languages-are.html