DECLARATIVE PROGRAMMING LANGUAGE
A 'declarative programming language' is a high-level language that describes a problem rather than defining a solution — it makes use of declarative programming. A declarative programming language says "what", while an imperative programming language says "how". The term is not entirely clear and often controversial; it is sometimes used as a buzzword.
Declarative programming languages can be declarative in a variety of ways. Prolog is declarative in that the programmer states relationships and asks a question about those relationships — without defining how to compute the answer. Functional programming languages are declarative in that functions relate their output to their input — without defining a strict order to evaluate any operations. Data-oriented programming languages and query languages are declarative in that queries are not given in terms of ''how'' to find data but instead give criteria for the desired data (SQL is an example).
Only the oddest examples of programming languages are ''completely'' declarative. Interface description languages (IDLs) are often declarative, as they specify relationships without specifying computation. But both of these examples don't ''compute'' anything, and it is not clear that they are in fact programming languages at all.
The distinctions are never sharp; Prolog can be used to compute explicitly, by use of recursive rules and the cut operator. Functions that aren't purely functional or make use of a monad (by being in CPS or using I/O) ''do'' strictly sequence operations. SQL's 'INSERT' and 'DELETE' commands are dependent on sequence. On the other hand, assembly language, the lowest level of instruction sequences possible, has declarative aspects — static memory allocation and macros, for example.
★ ABSET
★ Lustre
★ MetaPost
★ OpenLaszlo
★ Prolog
★ SQL
★ XSL Transformations
★ XML Sapiens
★ XAML
tries to provide an exhaustive list
★ Declarative redesign of a pocket calculator (Thimbleby, Harold. "A new calculator and why it is necessary", Middlesex University 1998)
★ Declarative programming
Declarative programming languages can be declarative in a variety of ways. Prolog is declarative in that the programmer states relationships and asks a question about those relationships — without defining how to compute the answer. Functional programming languages are declarative in that functions relate their output to their input — without defining a strict order to evaluate any operations. Data-oriented programming languages and query languages are declarative in that queries are not given in terms of ''how'' to find data but instead give criteria for the desired data (SQL is an example).
Only the oddest examples of programming languages are ''completely'' declarative. Interface description languages (IDLs) are often declarative, as they specify relationships without specifying computation. But both of these examples don't ''compute'' anything, and it is not clear that they are in fact programming languages at all.
The distinctions are never sharp; Prolog can be used to compute explicitly, by use of recursive rules and the cut operator. Functions that aren't purely functional or make use of a monad (by being in CPS or using I/O) ''do'' strictly sequence operations. SQL's 'INSERT' and 'DELETE' commands are dependent on sequence. On the other hand, assembly language, the lowest level of instruction sequences possible, has declarative aspects — static memory allocation and macros, for example.
| Contents |
| Languages generally considered declarative |
| Examples of declarative programming in action |
| See also |
Languages generally considered declarative
★ ABSET
★ Lustre
★ MetaPost
★ OpenLaszlo
★ Prolog
★ SQL
★ XSL Transformations
★ XML Sapiens
★ XAML
tries to provide an exhaustive list
Examples of declarative programming in action
★ Declarative redesign of a pocket calculator (Thimbleby, Harold. "A new calculator and why it is necessary", Middlesex University 1998)
See also
★ Declarative programming
This article provided by Wikipedia. To edit the contents of this article, click here for original source.
psst.. try this: add to faves

العربية
中国
Français
Deutsch
Ελληνική
हिन्दी
Italiano
日本語
Português
Русский
Español