Talk:Declarative programming language
His O
editIMO SQL isn't a programming language, rather a query language.
Makefiles
editIs a Makefile declarative programming?
- No. Unless you use non-standard features, it's hardly "programming", to begin with. (And if you do use those features, it's imperative programming.) --Piet Delport 11:22, 2 January 2006 (UTC)
- Yes. It allows one to make a computer perform some actions to achieve desired effects. It is a bit like SQL, classified here as programming language but from a different side. In SQL there are implicit loops, wound around fetched data, and in make there are implicit conditionals threaded between targets. In fact I am not really sure if a real, Turing complete, programming lnaguage with both loops and conditional statemets can be a declarative one. --steelman 22:24, 1 August 2006 (UTC)
Wrong sentence
editIt is wrong: "Sometimes, functional programming languages are called declarative programming languages". Eduard Proydakov.
- Well, technically speaking, I'm sure this is true. People do, after all, often make mistakes. Whether or not this is noteworthy or sufficiently common is dubious. Functional programming language certainly *aren't* declarative programming languages, however. Barring a good citation to justify the need for stating this, it should be excised. --63.166.226.83 (talk) 22:29, 20 May 2008 (UTC)
More precise clarification of "Declarative" required
edit
In support of the previous discussion topic, there are a number of other definitions of what precisely constitutes "Declarative" that need to be considered.
See for instance Functional Programming is not [declarative]:
A pertinent quote from the preface to the first edition of SICP, which clearly defines the differing philosophies:
Underlying our approach to this subject is our conviction that "computer science" is not a science and that its significance has little to do with computers. The computer revolution is a revolution in the way we think and in the way we express what we think. The essence of this change is the emergence of what might best be called procedural epistemology--the study of the structure of knowledge from an imperative point of view, as opposed to the more declarative point of view taken by classical mathematical subjects. Mathematics provides a framework for dealing precisely with notions of "what is". Computation provides a framework for dealing precisely with notions of "how to".
And in section 1.1.7 (2nd ed.):
The contrast between function and procedure is a reflection of the general distinction between describing properties of things and describing how to do things, or, as it is some times referred to, the distinction between declarative knowledge and imperative knowledge. In mathematics we are usually concerned with declarative (what is) descriptions, whereas in computer science we are usually concerned with imperative (how to) descriptions.
I would hesitate to make the artificial division between Computer Science and Mathematics, though. Mathematics definitely has both the declarative - functions, and the imperative - formulas that define how to calculate functions (there may be recursive implications to formulas, which can themselves be defined in terms of functions, but this seems to be a dangerous route to go down and may lead into Gödel's incompleteness theorem territory).
Perhaps, it could be said that the current perception of the difference between Computer Science and Mathematics varies in the emphasis placed upon how important declarative versus imperative modes of conceptualizing are. posted by TheUser on June 1 2005 -- please sign your posts by typing ~~~~
- That discussion on LtU is interesting, but I take the discussion there with a grain of salt. (Actually, I take any discussion not by Ehud or Anton or a few others with a grain of salt, but there's no need to play favorites here.) The best point made in the discussion is that strictly declarative programs don't express algorithms. This is and is not true. What about:
fib = 1 : 1 : zipWith (+) fib (tail fib)
- A little shaky. I mean, there's only one sensible way to compute that, and Haskell does it. But what then:
fac n = product [1..n]
- That's about as declarative as I can make the definition of the factorial of n: the product of the digits from 1 to n. There are a number of ways product could work, I don't care how it does it. I also don't care about how [1..n] is constructed. In fact, Haskell won't construct a list (from the bottom or the top) and then go up (or down) it, but instead go from 1 up to n, multiplying on the way.
- As for my rewrite, I cleared up the text a lot, adding examples of purely declarative languages and the question as to whether or not they're programming languages. I don't think this page is a good place to play out that debate, and it's enough to leave it as a question. I also cleaned up the list of decl. PLs. Might be nice to link to the Rogue-like game in Prolog.
- What the page does need now, though, are more examples of declarative programming in action. It's the sort of thing you only know when you see it, and the more examples the better. --Mgreenbe 11:41, 6 December 2005 (UTC)
Merge proposal
editI'm proposing this page be merged with declarative programming since there doesn't seem to be a lot of reason to support both pages. Neither one deals with much entirely distinct from the other.
What might be more interesting is a List Of Declarative Programming Languages page, however!
Since a declarative programming language is part of the bigger idea of declarative programming, I guess it should be merged into that page, but I'm not going to assume that logic is necessarily in accordance with Wikipedia policy. —Preceding unsigned comment added by 63.166.226.83 (talk) 22:34, 20 May 2008 (UTC)
- Strongly object - 144.131.104.81 (talk) 11:12, 24 September 2008 (UTC)
- Support. Can't see what could be hurt, and both pages need help badly. List of declarative programming languages sounds like (a) a quagmire, as it invites c2 style discussion, and (b) better as a category. But — be bold! Does 144.131.104.81 want to elaborate their problem (or perhaps log in, since an IP address with no contributions and an empty talk page isn't exactly compelling)? --mgreenbe (talk) 15:22, 25 September 2008 (UTC)
- N.B. Category:Declarative programming languages already exists. --mgreenbe (talk) 00:47, 28 September 2008 (UTC)
- Done. Both pages needed serious help, so I merged them. Tejoka (talk) 06:52, 5 October 2008 (UTC)