Declarative programming: Difference between revisions

Content deleted Content added
Explicitly include logic programming
mNo edit summary
Line 1:
'''Declarative programming''' is an approach to [[computer programming]] that takes a different approach from traditional [[imperative programming]] in [[C_Plus_Plus|C++]] or [[Java_programming_language|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 includes both [[Functional_programming|functional programming]] and [[logic programming]].
 
Declarative languages describe relationships between variables in terms of [[function]]s or [[inference rule]]s. The language executor (an [[Interpreter (computing)|interpreter]] or [[compiler]]) applies a fixed [[algorithm]] to these relations to produce a result.
 
Examples of declarative programming languages include [[Prolog]] and [[SQL]].