Declarative programming: Difference between revisions

Content deleted Content added
Citation bot (talk | contribs)
Alter: issue, pages. Add: isbn, date. Formatted dashes. | Use this bot. Report bugs. | Suggested by Guy Harris | #UCB_webform
Fix FOLDOC link.
Line 6:
In [[computer science]], '''declarative programming''' is a [[programming paradigm]]—a style of building the structure and elements of computer programs—that expresses the logic of a [[computation]] without describing its [[control flow]].<ref>{{citation|last=Lloyd|first=J.W.|title=Practical Advantages of Declarative Programming}}</ref>
 
Many languages that apply this style attempt to minimize or eliminate [[side effect (computer science)|side effects]] by describing ''what'' the program must accomplish in terms of the [[___domain knowledge|problem ___domain]], rather than describing ''how'' to accomplish it as a sequence of the programming [[language primitive]]s<ref name="FOLDOC 2004">{{cite web | title=declarative language | website=FOLDOC | date=17 May 2004 | url=https://foldoc.org/declarative%20language+language | access-date=267 JanuarySeptember 20202023}}</ref> (the ''how'' being left up to the language's [[programming language implementation|implementation]]). This is in contrast with [[imperative programming]], which implements [[algorithm]]s in explicit steps.<ref name="Sebesta 2016">{{cite book | last=Sebesta | first=Robert | title=Concepts of programming languages | publisher=Pearson | publication-place=Boston | year=2016 | isbn=978-0-13-394302-3 | oclc=896687896}}</ref>
 
Declarative programming often considers [[program (machine)|programs]] as theories of a [[Mathematical_logic#Formal_logical_systems|formal logic]], and computations as deductions in that logic space. Declarative programming may greatly simplify writing [[parallel computing|parallel programs]].<ref>{{cite web|url=http://www.cse.unsw.edu.au/~pls/damp09/ |title=DAMP 2009: Workshop on Declarative Aspects of Multicore Programming |publisher=Cse.unsw.edu.au |date=20 January 2009 |access-date=15 August 2013}}</ref>