Declarative programming: Difference between revisions

Content deleted Content added
Lssilva (talk | contribs)
No edit summary
No edit summary
Line 3:
In other words, declarative programming provides the ''what'', but leaves the ''how'' up to interpretation. Advantages of this approach are that
 
#it isolates the complex problem solving for the computer,
#it helps avoid the [[reinvention of the wheel]] problem, (i.e. one solution can be applied to many problem definitions),
#it allows for re-use/re-interpretation in different contexts (e.g. different language bindings for [[Interface description language|IDL]]), and
#it centralizes and condenses the problem definition thereby making for more comprehensible coding practices.
Line 13:
 
Declarative languages describe relationships between variables in terms of [[function (programming)|function]]s, [[inference rule]]s, or [[term-rewriting]] rules. The language executor (an [[Interpreter (computing)|interpreter]] or [[compiler]]) applies a fixed [[algorithm]] to these relations to produce a result.
 
==Applications==
 
Declarative programming languages are extensively used in solving [[artificial intelligence]], [[constraint-satisfaction problem]]s, [[database]]s, [[configuration management]] and [[Inter-process communication]].
 
In addition to the domains listed above, declarative programming is becoming a vital part of many Enterprise Programming solutions. For instance, instead of couching transactions and database access within procedural code, the application developer simply declares the relationships/dependencies between higher level objects (e.g. transactions, sql, object interfaces) and the implementation is left to the framework. See [[Hibernate (software)]], [[Enterprise Java Beans]] or [[Spring framework]] for examples of how this works.
Many of the dialects being created based on the [[XML]] format, can be described as declarative due largely to the increasing popularity of the declarative programming paradigm.
 
Many of the dialects being created based on the [[XML]] format, can be described as declarative due largely to the increasing popularity of the declarative programming paradigm.
 
==Example languages==