Information about Declarative 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. Logic programming languages, such as Prolog, are 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 IDLs 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.

Examples of declarative programming in action

See also

A high-level programming language is a programming language that, in comparison to low-level programming languages, may be more abstract, easier to use, or more portable across platforms.
..... Click the link for more information.
Declarative programming is a term with two distinct meanings, both of which are in current use.

According to one definition, a program is "declarative" if it describes what something is like, rather than how to create it.
..... Click the link for more information.
In computer science, imperative programming, as contrasted with declarative programming, is a programming paradigm that describes computation as statements that change a program state.
..... Click the link for more information.
<noinclude></noinclude> Logic programming (which might better be called logical programming by analogy with mathematical programming and linear programming) is, in its broadest sense, the use of mathematical logic for computer programming.
..... Click the link for more information.
Prolog
Paradigm: Logic programming
Appeared in: 1972
Designed by: Alain Colmerauer
Major implementations: BProlog, GNU Prolog, Quintus, SICStus, Strawberry, SWI-Prolog, YAP-Prolog
Dialects: ISO Prolog, Edinburgh Prolog
..... Click the link for more information.
Functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. It emphasizes the application of functions, in contrast with the imperative programming style that emphasizes changes in state.
..... Click the link for more information.
Query languages are computer languages used to make queries into databases and information systems.

Broadly, query languages can be classified according to whether they are database query languages or information retrieval query languages. Examples include:
  • .

..... Click the link for more information.
SQL
Paradigm: multi-paradigm
Appeared in: 1974
Designed by: Donald D. Chamberlin and Raymond F. Boyce
Developer: IBM
Latest release: SQL:2003/ 2003
Typing discipline: static, strong
Major implementations: Many
SQL
..... Click the link for more information.
A programming language is an artificial language that can be used to control the behavior of a machine, particularly a computer. Programming languages, like natural languagess, are defined by syntactic and semantic rules which describe their structure and meaning respectively.
..... Click the link for more information.


An interface description language (or alternately, interface definition language), or IDL for short, is a computer language used to describe a software component's interface.
..... Click the link for more information.
This article is written like a personal reflection or and may require .
Please [ improve this article] by rewriting this article in an . (, talk)


Purely functional
..... Click the link for more information.
Some functional programming languages make use of monads[1] [2] to structure programs which include operations that must be executed in a specific order.
..... Click the link for more information.
In functional programming, continuation-passing style is a style of programming in which control is passed explicitly in the form of a continuation.

Introduction

Instead of "returning" values as in the more familiar direct style, a function written in CPS takes an explicit
..... Click the link for more information.

..... Click the link for more information.
assembly language is a low-level language for programming computers. It implements a symbolic representation of the numeric machine codes and other constants needed to program a particular CPU architecture.
..... Click the link for more information.
Static memory allocation refers to the process of allocating memory at compile-time before the associated program is executed, unlike dynamic memory allocation or automatic memory allocation where memory is allocated as required at run-time.
..... Click the link for more information.
''For other uses, see Macro (disambiguation)


A macro in computer science is a rule or pattern that specifies how a certain input sequence (often a sequence of characters) should be mapped to an output sequence (also often a sequence of characters) according
..... Click the link for more information.
Declarative programming is a term with two distinct meanings, both of which are in current use.

According to one definition, a program is "declarative" if it describes what something is like, rather than how to create it.
..... Click the link for more information.
A programming language is an artificial language that can be used to control the behavior of a machine, particularly a computer. Programming languages, like natural languagess, are defined by syntactic and semantic rules which describe their structure and meaning respectively.
..... Click the link for more information.
In computer science, Array programming languages (also known as vector or multidimensional languages) generalize operations on scalars to apply transparently to vectors, matrices, and higher dimensional arrays.
..... Click the link for more information.
assembly language is a low-level language for programming computers. It implements a symbolic representation of the numeric machine codes and other constants needed to program a particular CPU architecture.
..... Click the link for more information.
A compiled language is a programming language whose implementations are typically compilers (translators which generate machine code from source code), and not interpreters (step-by-step executors of source code, where no translation takes place).
..... Click the link for more information.
Concurrent computing is the concurrent (simultaneous) execution of multiple interacting computational tasks. These tasks may be implemented as separate programs, or as a set of processes or threads created by a single program.
..... Click the link for more information.
Curly brace or bracket programming languages are those which use balanced brackets ( , also known as "brace brackets" or simply "braces") to make blocks in their syntax or formal grammar, mainly due to being C-influenced.
..... Click the link for more information.
A Data-structured language is a programming language in which the data structure is a main organizing principle, representation, model, for data and logic (code) alike, in which both are stored and operated upon, i.e.
..... Click the link for more information.
Functional programming is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. It emphasizes the application of functions, in contrast with the imperative programming style that emphasizes changes in state.
..... Click the link for more information.
In computer programming an interpreted language is a programming language whose implementation often takes the form of an interpreter. Theoretically, any language may be compiled or interpreted, so this designation is applied purely because of common implementation practice and not
..... Click the link for more information.
<noinclude></noinclude> Logic programming (which might better be called logical programming by analogy with mathematical programming and linear programming) is, in its broadest sense, the use of mathematical logic for computer programming.
..... Click the link for more information.
Machine code or machine language is a system of instructions and data directly executed by a computer's central processing unit. Machine code is the lowest-level of abstraction for representing a computer program.
..... Click the link for more information.
Macro may refer to:
  • Macro (for macroinstruction), a computer science term for a set of instructions that is represented in an abbreviated format.
  • Macro photography, a type of close-up photography.

..... Click the link for more information.


This article is copied from an article on Wikipedia.org - the free encyclopedia created and edited by online user community. The text was not checked or edited by anyone on our staff. Although the vast majority of the wikipedia encyclopedia articles provide accurate and timely information please do not assume the accuracy of any particular article. This article is distributed under the terms of GNU Free Documentation License.
Herod_Archelaus


page counter