Encyclopedia > Declarative programming

  Article Content

Declarative programming

Declarative programming is an approach to computer programming that takes a different approach from traditional imperative programming in C++ or Java. Whereas imperative programming gives the computer a list of instructions to execute in a particular order, declarative programming describes to the computer a set of conditions and lets the computer figure out how to satisfy them. Declarative programming is different from functional programming, although there are some similarities between the two.

Declarative languages describe relationships between variables in terms of functions or inference rules[?]. The language executor (an interpreter or compiler) applies a fixed algorithm to these relations to produce a result.

Examples of declarative programming languages include Prolog and SQL.

Declarative programming languages are extensively used in solving artificial intelligence and constraint-satisfaction problems.

See also: 4GL, constraint programming



All Wikipedia text is available under the terms of the GNU Free Documentation License

 
  Search Encyclopedia

Search over one million articles, find something about almost anything!
 
 
  
  Featured Article
Thomas a Kempis

... in ten years. Excellent as these counsels are, they are set in the minor key and are especially adapted for souls burdened with care and sorrow and sitting in ...

 
 
 
This page was created in 26.7 ms