Jump to content

Edit filter log

Details for log entry 17366979

11:01, 23 December 2016: 203.129.254.117 (talk) triggered filter 172, performing the action "edit" on Declarative programming. Actions taken: Tag; Filter description: Section blanking (examine | diff)

Changes made in edit



{{As of | 2013}} some software systems combine traditional user-interface markup languages (such as HTML) with declarative markup that defines what (but not how) the back-end server systems should do to support the declared interface. Such systems, typically using a domain-specific [[XML]] [[XML namespace|namespace]], may include abstractions of [[SQL]] database syntax or parameterised calls to web services using [[representational state transfer]] (REST) and [[SOAP]].
{{As of | 2013}} some software systems combine traditional user-interface markup languages (such as HTML) with declarative markup that defines what (but not how) the back-end server systems should do to support the declared interface. Such systems, typically using a domain-specific [[XML]] [[XML namespace|namespace]], may include abstractions of [[SQL]] database syntax or parameterised calls to web services using [[representational state transfer]] (REST) and [[SOAP]].

===Functional programming===
[[Functional programming]], and in particular purely functional programming, attempts to minimize or eliminate side effects, and is therefore considered declarative. Most {{citation needed|reason=all is also most, but are there any that don't?|date=August 2015}} functional languages, such as [[Scheme (programming language)|Scheme]], [[Clojure]], [[Erlang (programming language)|Erlang]], [[Haskell (programming language)|Haskell]], [[OCaml]], [[Standard ML]] and [[Unlambda]], do permit side effects in practice, using [[Pure function|non-pure functions]] to interact with the outside world when needed.


===Hybrid languages===
===Hybrid languages===

Action parameters

VariableValue
Whether or not the edit is marked as minor (no longer in use) (minor_edit)
false
Edit count of the user (user_editcount)
null
Name of the user account (user_name)
'203.129.254.117'
Age of the user account (user_age)
0
Groups (including implicit) the user is in (user_groups)
[ 0 => '*' ]
Global groups that the user is in (global_user_groups)
[]
Whether or not a user is editing through the mobile interface (user_mobile)
false
Page ID (page_id)
210648
Page namespace (page_namespace)
0
Page title without namespace (page_title)
'Declarative programming'
Full page title (page_prefixedtitle)
'Declarative programming'
Last ten users to contribute to the page (page_recent_contributors)
[ 0 => '203.129.254.117', 1 => 'Götz', 2 => 'GreenC bot', 3 => 'Arthur MILCHIOR', 4 => 'Spyglasses', 5 => '78.1.18.205', 6 => '75.166.164.95', 7 => '108.221.18.208', 8 => '15.203.233.84', 9 => 'Cyberbot II' ]
First user to contribute to the page (page_first_contributor)
'Maxomai'
Action (action)
'edit'
Edit summary/reason (summary)
'/* Functional programming */ '
Old content model (old_content_model)
'wikitext'
New content model (new_content_model)
'wikitext'
Old page wikitext, before the edit (old_wikitext)
'{{multiple issues| {{More footnotes|date=April 2010}} {{Refimprove|date=February 2015}}}} {{Programming paradigms}} 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 [[problem domain]], rather than describe ''how'' to accomplish it as a sequence of the programming language [[language primitive|primitive]]s<ref>[http://foldoc.org/declarative%20language Declarative language] in The Free On-line Dictionary of Computing, Editor Denis Howe.</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. Declarative programming often considers [[program (machine)|programs]] as theories of a [[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=2009-01-20 |accessdate=2013-08-15}}</ref> Common declarative languages include those of [[database query language]]s (e.g., [[SQL]], [[XQuery]]), [[regular expression]]s, [[logic programming]], [[functional programming]], and [[configuration management]] systems. ==Definition== Declarative programming is often defined as any style of programming that is not [[imperative programming|imperative]]. A number of other common definitions exist that attempt to give the term a definition other than simply contrasting it with imperative programming. For example: * A program that describes ''what'' computation should be performed and not ''how'' to compute it * Any programming language that lacks [[side effect (computer science)|side effects]] (or more specifically, is [[referential transparency (computer science)|referentially transparent]]) * A language with a clear correspondence to [[mathematical logic]].<ref>{{cite thesis |first=Manuel M. T. |last=Chakravarty |date=14 February 1997 |url=http://www.cse.unsw.edu.au/~chak/papers/diss.ps.gz |title=On the Massively Parallel Execution of Declarative Programs |type=Doctoral dissertation |publisher=[[Technische Universität Berlin]] |accessdate=26 February 2015 |quote=In this context, the criterion for calling a programming language declarative is the existence of a clear, mathematically established correspondence between the language and mathematical logic such that a declarative semantics for the language can be based on the model or the proof theory (or both) of the logic.}}</ref><!-- this citation is just for this bullet point --> These definitions overlap substantially. Declarative programming contrasts with imperative and [[procedural programming]]. Declarative programming is a non-imperative style of programming in which programs describe their desired results without explicitly listing commands or steps that must be performed. [[Functional programming|Functional]] and [[logical programming]] languages are characterized by a declarative programming style. In [[logic programming|logical programming languages]], programs consist of logical statements, and the program executes by searching for proofs of the statements. In a [[pure functional language]], such as [[Haskell (programming language)|Haskell]], all functions are [[pure function|without side effects]], and state changes are only represented as functions that transform the state, which is explicitly represented as a [[First-class citizen|first class]] object in the program. Although pure functional languages are non-imperative, they often provide a facility for describing the effect of a function as a series of steps. Other functional languages, such as [[Lisp (programming language)|Lisp]], [[OCaml]] and [[Erlang (programming language)|Erlang]], support a mixture of procedural and functional programming. Some [[logic programming|logical programming languages]], such as [[Prolog]], and [[database query language]]s, such as [[SQL]], while declarative in principle, also support a procedural style of programming. ==Subparadigms== Declarative programming is an [[umbrella term]] that includes a number of better-known [[programming paradigm]]s. ===Constraint programming=== [[Constraint programming]] states relations between variables in the form of constraints that specify the properties of the target solution. The set of constraints is [[solver (computer science)|solved]] by giving a value to each variable so that the solution is consistent with the maximum number of constraints. Constraint programming often complements other paradigms: functional, logical, or even imperative programming. ===Domain-specific languages=== Well-known examples of declarative [[domain-specific language]]s (DSLs) include the [[yacc]] parser generator input language, the [[Make (software)|Make]] build specification language, [[Puppet (software)|Puppet]]'s configuration management language, [[regular expression]]s, and a subset of [[SQL]] (SELECT queries, for example). DSLs have the advantage of being useful while not necessarily needing to be [[Turing-complete]], which makes it easier for a language to be purely declarative. Many markup languages such as [[HTML]], [[MXML]], [[XAML]], [[XSLT]] or other [[user-interface markup language]]s are often declarative. HTML, for example, only describes what should appear on a webpage - it specifies neither [[control flow]] rendering a page nor its possible [[interaction]]s with a user. {{As of | 2013}} some software systems combine traditional user-interface markup languages (such as HTML) with declarative markup that defines what (but not how) the back-end server systems should do to support the declared interface. Such systems, typically using a domain-specific [[XML]] [[XML namespace|namespace]], may include abstractions of [[SQL]] database syntax or parameterised calls to web services using [[representational state transfer]] (REST) and [[SOAP]]. ===Functional programming=== [[Functional programming]], and in particular purely functional programming, attempts to minimize or eliminate side effects, and is therefore considered declarative. Most {{citation needed|reason=all is also most, but are there any that don't?|date=August 2015}} functional languages, such as [[Scheme (programming language)|Scheme]], [[Clojure]], [[Erlang (programming language)|Erlang]], [[Haskell (programming language)|Haskell]], [[OCaml]], [[Standard ML]] and [[Unlambda]], do permit side effects in practice, using [[Pure function|non-pure functions]] to interact with the outside world when needed. ===Hybrid languages=== {{see also|Multi-paradigm programming language}} [[Make (software)|Makefiles]], for example, specify dependencies in a declarative fashion,<ref>[http://phoenix.labri.fr/wiki/doku.php?id=an_overview_on_dsls ] {{webarchive |url=https://web.archive.org/web/20071023021126/http://phoenix.labri.fr/wiki/doku.php?id=an_overview_on_dsls |date=October 23, 2007 }}</ref> but include an imperative list of actions to take as well. Similarly, [[yacc]] specifies a context free grammar declaratively, but includes code snippets from a host language, which is usually imperative (such as [[C (programming language)|C]]). ===Logic programming=== [[Logic programming]] languages such as [[Prolog]] state and query relations. The specifics of ''how'' these queries are answered is up to the implementation and its theorem prover, but typically take the form of some sort of [[unification (computing)|unification]]. Like functional programming, many logic programming languages permit side effects, and as a result are not strictly declarative. ===Modeling=== {{Main|Mathematical model}} Models, or mathematical representations, of physical systems may be implemented in computer code that is declarative. The code contains a number of equations, not imperative assignments, that describe ("declare") the behavioral relationships. When a model is expressed in this formalism, a computer is able to perform algebraic manipulations to best formulate the solution algorithm. The mathematical causality is typically imposed at the boundaries of the physical system, while the behavioral description of the system itself is declarative or acausal. Declarative modeling languages and environments include [[Analytica (software)|Analytica]], [[Modelica]] and [[Simile (computing)|Simile]].<ref>{{cite web|url=http://www.simulistics.com/tour/declarative.htm |title=Declarative modelling |publisher=Simulistics |date= |accessdate=2013-08-15}}</ref> ==See also== * [[List of programming languages by type#Declarative_languages|List of declarative programming languages]] * [[Comparison of programming paradigms]] * [[Inductive programming]] ==References== {{Reflist}} ==External links== * Frans Coenen. [http://www.csc.liv.ac.uk/~frans/OldLectures/2CS24/declarative.html#detail Characteristics of declarative programming languages]. 1999. * [[Robert Harper (computer scientist)|Robert Harper]]. ** [https://existentialtype.wordpress.com/2013/07/18/what-if-anything-is-a-declarative-language/ What, If Anything, Is A Declarative Language?]. 2013. ** [https://existentialtype.wordpress.com/2013/07/22/there-is-such-a-thing-as-a-declarative-language/ There Is Such A Thing As A Declarative Language, and It’s The World’s Best DSL]. 2013. * Olof Torgersson. [http://www.cs.chalmers.se/~oloft/Papers/wm96/wm96.html A Note on Declarative Programming Paradigms and the Future of Definitional Programming]. 1996. {{Programming language}} {{Authority control}} [[Category:Declarative programming| ]] [[Category:Programming paradigms]]'
New page wikitext, after the edit (new_wikitext)
'{{multiple issues| {{More footnotes|date=April 2010}} {{Refimprove|date=February 2015}}}} {{Programming paradigms}} 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 [[problem domain]], rather than describe ''how'' to accomplish it as a sequence of the programming language [[language primitive|primitive]]s<ref>[http://foldoc.org/declarative%20language Declarative language] in The Free On-line Dictionary of Computing, Editor Denis Howe.</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. Declarative programming often considers [[program (machine)|programs]] as theories of a [[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=2009-01-20 |accessdate=2013-08-15}}</ref> Common declarative languages include those of [[database query language]]s (e.g., [[SQL]], [[XQuery]]), [[regular expression]]s, [[logic programming]], [[functional programming]], and [[configuration management]] systems. ==Definition== Declarative programming is often defined as any style of programming that is not [[imperative programming|imperative]]. A number of other common definitions exist that attempt to give the term a definition other than simply contrasting it with imperative programming. For example: * A program that describes ''what'' computation should be performed and not ''how'' to compute it * Any programming language that lacks [[side effect (computer science)|side effects]] (or more specifically, is [[referential transparency (computer science)|referentially transparent]]) * A language with a clear correspondence to [[mathematical logic]].<ref>{{cite thesis |first=Manuel M. T. |last=Chakravarty |date=14 February 1997 |url=http://www.cse.unsw.edu.au/~chak/papers/diss.ps.gz |title=On the Massively Parallel Execution of Declarative Programs |type=Doctoral dissertation |publisher=[[Technische Universität Berlin]] |accessdate=26 February 2015 |quote=In this context, the criterion for calling a programming language declarative is the existence of a clear, mathematically established correspondence between the language and mathematical logic such that a declarative semantics for the language can be based on the model or the proof theory (or both) of the logic.}}</ref><!-- this citation is just for this bullet point --> These definitions overlap substantially. Declarative programming contrasts with imperative and [[procedural programming]]. Declarative programming is a non-imperative style of programming in which programs describe their desired results without explicitly listing commands or steps that must be performed. [[Functional programming|Functional]] and [[logical programming]] languages are characterized by a declarative programming style. In [[logic programming|logical programming languages]], programs consist of logical statements, and the program executes by searching for proofs of the statements. In a [[pure functional language]], such as [[Haskell (programming language)|Haskell]], all functions are [[pure function|without side effects]], and state changes are only represented as functions that transform the state, which is explicitly represented as a [[First-class citizen|first class]] object in the program. Although pure functional languages are non-imperative, they often provide a facility for describing the effect of a function as a series of steps. Other functional languages, such as [[Lisp (programming language)|Lisp]], [[OCaml]] and [[Erlang (programming language)|Erlang]], support a mixture of procedural and functional programming. Some [[logic programming|logical programming languages]], such as [[Prolog]], and [[database query language]]s, such as [[SQL]], while declarative in principle, also support a procedural style of programming. ==Subparadigms== Declarative programming is an [[umbrella term]] that includes a number of better-known [[programming paradigm]]s. ===Constraint programming=== [[Constraint programming]] states relations between variables in the form of constraints that specify the properties of the target solution. The set of constraints is [[solver (computer science)|solved]] by giving a value to each variable so that the solution is consistent with the maximum number of constraints. Constraint programming often complements other paradigms: functional, logical, or even imperative programming. ===Domain-specific languages=== Well-known examples of declarative [[domain-specific language]]s (DSLs) include the [[yacc]] parser generator input language, the [[Make (software)|Make]] build specification language, [[Puppet (software)|Puppet]]'s configuration management language, [[regular expression]]s, and a subset of [[SQL]] (SELECT queries, for example). DSLs have the advantage of being useful while not necessarily needing to be [[Turing-complete]], which makes it easier for a language to be purely declarative. Many markup languages such as [[HTML]], [[MXML]], [[XAML]], [[XSLT]] or other [[user-interface markup language]]s are often declarative. HTML, for example, only describes what should appear on a webpage - it specifies neither [[control flow]] rendering a page nor its possible [[interaction]]s with a user. {{As of | 2013}} some software systems combine traditional user-interface markup languages (such as HTML) with declarative markup that defines what (but not how) the back-end server systems should do to support the declared interface. Such systems, typically using a domain-specific [[XML]] [[XML namespace|namespace]], may include abstractions of [[SQL]] database syntax or parameterised calls to web services using [[representational state transfer]] (REST) and [[SOAP]]. ===Hybrid languages=== {{see also|Multi-paradigm programming language}} [[Make (software)|Makefiles]], for example, specify dependencies in a declarative fashion,<ref>[http://phoenix.labri.fr/wiki/doku.php?id=an_overview_on_dsls ] {{webarchive |url=https://web.archive.org/web/20071023021126/http://phoenix.labri.fr/wiki/doku.php?id=an_overview_on_dsls |date=October 23, 2007 }}</ref> but include an imperative list of actions to take as well. Similarly, [[yacc]] specifies a context free grammar declaratively, but includes code snippets from a host language, which is usually imperative (such as [[C (programming language)|C]]). ===Logic programming=== [[Logic programming]] languages such as [[Prolog]] state and query relations. The specifics of ''how'' these queries are answered is up to the implementation and its theorem prover, but typically take the form of some sort of [[unification (computing)|unification]]. Like functional programming, many logic programming languages permit side effects, and as a result are not strictly declarative. ===Modeling=== {{Main|Mathematical model}} Models, or mathematical representations, of physical systems may be implemented in computer code that is declarative. The code contains a number of equations, not imperative assignments, that describe ("declare") the behavioral relationships. When a model is expressed in this formalism, a computer is able to perform algebraic manipulations to best formulate the solution algorithm. The mathematical causality is typically imposed at the boundaries of the physical system, while the behavioral description of the system itself is declarative or acausal. Declarative modeling languages and environments include [[Analytica (software)|Analytica]], [[Modelica]] and [[Simile (computing)|Simile]].<ref>{{cite web|url=http://www.simulistics.com/tour/declarative.htm |title=Declarative modelling |publisher=Simulistics |date= |accessdate=2013-08-15}}</ref> ==See also== * [[List of programming languages by type#Declarative_languages|List of declarative programming languages]] * [[Comparison of programming paradigms]] * [[Inductive programming]] ==References== {{Reflist}} ==External links== * Frans Coenen. [http://www.csc.liv.ac.uk/~frans/OldLectures/2CS24/declarative.html#detail Characteristics of declarative programming languages]. 1999. * [[Robert Harper (computer scientist)|Robert Harper]]. ** [https://existentialtype.wordpress.com/2013/07/18/what-if-anything-is-a-declarative-language/ What, If Anything, Is A Declarative Language?]. 2013. ** [https://existentialtype.wordpress.com/2013/07/22/there-is-such-a-thing-as-a-declarative-language/ There Is Such A Thing As A Declarative Language, and It’s The World’s Best DSL]. 2013. * Olof Torgersson. [http://www.cs.chalmers.se/~oloft/Papers/wm96/wm96.html A Note on Declarative Programming Paradigms and the Future of Definitional Programming]. 1996. {{Programming language}} {{Authority control}} [[Category:Declarative programming| ]] [[Category:Programming paradigms]]'
Unified diff of changes made by edit (edit_diff)
'@@ -38,7 +38,4 @@ {{As of | 2013}} some software systems combine traditional user-interface markup languages (such as HTML) with declarative markup that defines what (but not how) the back-end server systems should do to support the declared interface. Such systems, typically using a domain-specific [[XML]] [[XML namespace|namespace]], may include abstractions of [[SQL]] database syntax or parameterised calls to web services using [[representational state transfer]] (REST) and [[SOAP]]. - -===Functional programming=== -[[Functional programming]], and in particular purely functional programming, attempts to minimize or eliminate side effects, and is therefore considered declarative. Most {{citation needed|reason=all is also most, but are there any that don't?|date=August 2015}} functional languages, such as [[Scheme (programming language)|Scheme]], [[Clojure]], [[Erlang (programming language)|Erlang]], [[Haskell (programming language)|Haskell]], [[OCaml]], [[Standard ML]] and [[Unlambda]], do permit side effects in practice, using [[Pure function|non-pure functions]] to interact with the outside world when needed. ===Hybrid languages=== '
New page size (new_size)
9553
Old page size (old_size)
10189
Size change in edit (edit_delta)
-636
Lines added in edit (added_lines)
[]
Lines removed in edit (removed_lines)
[ 0 => false, 1 => '===Functional programming===', 2 => '[[Functional programming]], and in particular purely functional programming, attempts to minimize or eliminate side effects, and is therefore considered declarative. Most {{citation needed|reason=all is also most, but are there any that don't?|date=August 2015}} functional languages, such as [[Scheme (programming language)|Scheme]], [[Clojure]], [[Erlang (programming language)|Erlang]], [[Haskell (programming language)|Haskell]], [[OCaml]], [[Standard ML]] and [[Unlambda]], do permit side effects in practice, using [[Pure function|non-pure functions]] to interact with the outside world when needed.' ]
New page wikitext, pre-save transformed (new_pst)
'{{multiple issues| {{More footnotes|date=April 2010}} {{Refimprove|date=February 2015}}}} {{Programming paradigms}} 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 [[problem domain]], rather than describe ''how'' to accomplish it as a sequence of the programming language [[language primitive|primitive]]s<ref>[http://foldoc.org/declarative%20language Declarative language] in The Free On-line Dictionary of Computing, Editor Denis Howe.</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. Declarative programming often considers [[program (machine)|programs]] as theories of a [[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=2009-01-20 |accessdate=2013-08-15}}</ref> Common declarative languages include those of [[database query language]]s (e.g., [[SQL]], [[XQuery]]), [[regular expression]]s, [[logic programming]], [[functional programming]], and [[configuration management]] systems. ==Definition== Declarative programming is often defined as any style of programming that is not [[imperative programming|imperative]]. A number of other common definitions exist that attempt to give the term a definition other than simply contrasting it with imperative programming. For example: * A program that describes ''what'' computation should be performed and not ''how'' to compute it * Any programming language that lacks [[side effect (computer science)|side effects]] (or more specifically, is [[referential transparency (computer science)|referentially transparent]]) * A language with a clear correspondence to [[mathematical logic]].<ref>{{cite thesis |first=Manuel M. T. |last=Chakravarty |date=14 February 1997 |url=http://www.cse.unsw.edu.au/~chak/papers/diss.ps.gz |title=On the Massively Parallel Execution of Declarative Programs |type=Doctoral dissertation |publisher=[[Technische Universität Berlin]] |accessdate=26 February 2015 |quote=In this context, the criterion for calling a programming language declarative is the existence of a clear, mathematically established correspondence between the language and mathematical logic such that a declarative semantics for the language can be based on the model or the proof theory (or both) of the logic.}}</ref><!-- this citation is just for this bullet point --> These definitions overlap substantially. Declarative programming contrasts with imperative and [[procedural programming]]. Declarative programming is a non-imperative style of programming in which programs describe their desired results without explicitly listing commands or steps that must be performed. [[Functional programming|Functional]] and [[logical programming]] languages are characterized by a declarative programming style. In [[logic programming|logical programming languages]], programs consist of logical statements, and the program executes by searching for proofs of the statements. In a [[pure functional language]], such as [[Haskell (programming language)|Haskell]], all functions are [[pure function|without side effects]], and state changes are only represented as functions that transform the state, which is explicitly represented as a [[First-class citizen|first class]] object in the program. Although pure functional languages are non-imperative, they often provide a facility for describing the effect of a function as a series of steps. Other functional languages, such as [[Lisp (programming language)|Lisp]], [[OCaml]] and [[Erlang (programming language)|Erlang]], support a mixture of procedural and functional programming. Some [[logic programming|logical programming languages]], such as [[Prolog]], and [[database query language]]s, such as [[SQL]], while declarative in principle, also support a procedural style of programming. ==Subparadigms== Declarative programming is an [[umbrella term]] that includes a number of better-known [[programming paradigm]]s. ===Constraint programming=== [[Constraint programming]] states relations between variables in the form of constraints that specify the properties of the target solution. The set of constraints is [[solver (computer science)|solved]] by giving a value to each variable so that the solution is consistent with the maximum number of constraints. Constraint programming often complements other paradigms: functional, logical, or even imperative programming. ===Domain-specific languages=== Well-known examples of declarative [[domain-specific language]]s (DSLs) include the [[yacc]] parser generator input language, the [[Make (software)|Make]] build specification language, [[Puppet (software)|Puppet]]'s configuration management language, [[regular expression]]s, and a subset of [[SQL]] (SELECT queries, for example). DSLs have the advantage of being useful while not necessarily needing to be [[Turing-complete]], which makes it easier for a language to be purely declarative. Many markup languages such as [[HTML]], [[MXML]], [[XAML]], [[XSLT]] or other [[user-interface markup language]]s are often declarative. HTML, for example, only describes what should appear on a webpage - it specifies neither [[control flow]] rendering a page nor its possible [[interaction]]s with a user. {{As of | 2013}} some software systems combine traditional user-interface markup languages (such as HTML) with declarative markup that defines what (but not how) the back-end server systems should do to support the declared interface. Such systems, typically using a domain-specific [[XML]] [[XML namespace|namespace]], may include abstractions of [[SQL]] database syntax or parameterised calls to web services using [[representational state transfer]] (REST) and [[SOAP]]. ===Hybrid languages=== {{see also|Multi-paradigm programming language}} [[Make (software)|Makefiles]], for example, specify dependencies in a declarative fashion,<ref>[http://phoenix.labri.fr/wiki/doku.php?id=an_overview_on_dsls ] {{webarchive |url=https://web.archive.org/web/20071023021126/http://phoenix.labri.fr/wiki/doku.php?id=an_overview_on_dsls |date=October 23, 2007 }}</ref> but include an imperative list of actions to take as well. Similarly, [[yacc]] specifies a context free grammar declaratively, but includes code snippets from a host language, which is usually imperative (such as [[C (programming language)|C]]). ===Logic programming=== [[Logic programming]] languages such as [[Prolog]] state and query relations. The specifics of ''how'' these queries are answered is up to the implementation and its theorem prover, but typically take the form of some sort of [[unification (computing)|unification]]. Like functional programming, many logic programming languages permit side effects, and as a result are not strictly declarative. ===Modeling=== {{Main|Mathematical model}} Models, or mathematical representations, of physical systems may be implemented in computer code that is declarative. The code contains a number of equations, not imperative assignments, that describe ("declare") the behavioral relationships. When a model is expressed in this formalism, a computer is able to perform algebraic manipulations to best formulate the solution algorithm. The mathematical causality is typically imposed at the boundaries of the physical system, while the behavioral description of the system itself is declarative or acausal. Declarative modeling languages and environments include [[Analytica (software)|Analytica]], [[Modelica]] and [[Simile (computing)|Simile]].<ref>{{cite web|url=http://www.simulistics.com/tour/declarative.htm |title=Declarative modelling |publisher=Simulistics |date= |accessdate=2013-08-15}}</ref> ==See also== * [[List of programming languages by type#Declarative_languages|List of declarative programming languages]] * [[Comparison of programming paradigms]] * [[Inductive programming]] ==References== {{Reflist}} ==External links== * Frans Coenen. [http://www.csc.liv.ac.uk/~frans/OldLectures/2CS24/declarative.html#detail Characteristics of declarative programming languages]. 1999. * [[Robert Harper (computer scientist)|Robert Harper]]. ** [https://existentialtype.wordpress.com/2013/07/18/what-if-anything-is-a-declarative-language/ What, If Anything, Is A Declarative Language?]. 2013. ** [https://existentialtype.wordpress.com/2013/07/22/there-is-such-a-thing-as-a-declarative-language/ There Is Such A Thing As A Declarative Language, and It’s The World’s Best DSL]. 2013. * Olof Torgersson. [http://www.cs.chalmers.se/~oloft/Papers/wm96/wm96.html A Note on Declarative Programming Paradigms and the Future of Definitional Programming]. 1996. {{Programming language}} {{Authority control}} [[Category:Declarative programming| ]] [[Category:Programming paradigms]]'
Whether or not the change was made through a Tor exit node (tor_exit_node)
0
Unix timestamp of change (timestamp)
1482490869