Declarative programming language
|
A declarative programming language is a high-level language that describes a problem rather than defining a solution.
"Declarative" is in contrast to "imperative", cf. imperative programming language, where orders (imperatives) are given to the computer: "Take this, do that". An imperative programming language is (almost) the same as procedural language or procedural programming language.
The distinctions are never sharp; any computer language has an element of initializing a process in a computer, in order to be of any usage. Hence every computer language is somewhat procedural, and the distinction mainly serves to explain shades of differences, degrees of abstraction-levels and the principles behind the implementation.
Likewise even procedural low-level languages benefits from symbols representing data storage locations, the addresses (posititions, implementations) of which the programmer does not care to know.
Especially the isolation between actual implementation and abstractions is an important technique in order to get a broader picture of a computersystem. However, sometimes it is important to understand the implementation rather than enjoy the isolation, e.g. if it is necessary to optimize.
Data-oriented languages such as SQL fall into the category of declarative languages, as do Interface Definition Languages.
Sometimes, functional programming languages are called declarative programming languages.