Talk:Programming language/Archive 7

From Wikipedia, the free encyclopedia
Jump to: navigation, search

Programming language lists

I've created {{Programming language lists}} (seen at right) to collect the 4 lists that were all linked from each other. Please watchlist. Thanks. -- Quiddity (talk) 18:57, 14 June 2008 (UTC)

Maybe A-class?

After changing a few formulations in the beginning, I came to realize I like this article very much. It is well done and properly layouted. Maybe this article should be considered for A-class after some reviews? Said: Rursus 12:20, 23 June 2008 (UTC)

The A-class designation is decided by each involved WikiProject separately and requires at least two reviewers. Some WikiProjects, such as WikiProject Computer science, are too small to support this kind of review process and so do not use the A-class designation. I do not know if the Computing WikiProject uses the A-class designation. --slashem (talk) 19:54, 22 July 2008 (UTC)

Natural language comparison addition

This new text has been added repeatedly by an editor:

While natural languages usually can be used as spoken language, programming languages are meant to write carefully crafted programs that are feed to the machine for execution.

To my mind, I cannot see anything useful that is added by this sentence, and several factual inaccuracies in the sentence as written.

  1. The use of natural languages as spoken languages is built into their definition, and a wikilink suffices.
  2. Programs written in PLs may or may not be:
    1. Carefully crafted
    2. Fed to machine for execution

Both things about programs are nice to do, but neither is part of the definition. Sloppy programs are still programs, and programs might only be read by humans, never executed. The existing discussion seems to cover this matter more accurately already. LotLE×talk 22:39, 30 July 2008 (UTC)

User talk:Lulu of the Lotus-Eaters, I agree with your analysis. Derek farn (talk) 01:01, 31 July 2008 (UTC)
I don't, that's why included the deleted text. I feel that there's a point not addressed in the article in it's current form.
The article doesn't convey the idea of how PLs are used, what activity must someone perform to express a given meaning in language to "give instructions to the machine". Someone could get the idea that PLs are like Latin, i.e. they're contrived and difficult but ultimately you can control a computer by giving it spoken orders, one by one.
Unfortunately this is exactly how is portrayed in popular culture. People could watch the I, robot movie and come here to learn how to program a robot, and would leave exactly with the idea that you simply speak to the robot in a special way to tell it what it has to do. Go and read the article, there's nothing that would clear up such misconception.
You can disagree with the wording I used to express that idea, but I really feel that this point must be addressed, and we should agree on a way to include it. Thinking of it, a section describing the activity of computer programming (for which there's not even a link) would suffice. Diego (talk) 06:29, 31 July 2008 (UTC)
Also, I've found that this sentence form the Computer program article contradict this view of programs as a mean to communicate algorithms between humans:
"a computer program does nothing unless its instructions are executed by a central processor."
This should be clarified so that the two articles agree in what a program is meant to do.Diego (talk) 06:37, 31 July 2008 (UTC)
What is it that you perceive as not being covered, Diego Moya, by the first sentence of the article: "A programming language is an artificial language that can be used to control the behavior of a machine, particularly a computer."
What I perceive as not being addresed is certainly not covered by the first sentence, because what is not being covered is HOW "a programming language can be used to control the behavior of a machine", i.e. "what is programming". If you think that this article denies the idea that you can control a robot by speaking aloud in a programming language, you won't have a problem in telling me exactly what is the sentence or paragraph that contradicts it? Or explaining why computer programming is not mentioned even once. Diego (talk) 17:26, 31 July 2008 (UTC)
While movies are, no doubt, inaccurate in portraying programming, the meaning of a PL is not restricted to a particular difficulty or a particular syntax. A variety of PLs have been proposed as being "close to natural language", and we may (or may not) see ones that are closer in the future. LotLE×talk 15:52, 31 July 2008 (UTC)
Should I take it to mean that you *endorse* that computers can be programmed by speaking to them, and that usage is to be considered a PL? Because that's not at all supported by their definition in the article. Unfortunately it's also not denied, and I think that it should be (with all the pertinent qualifiers, of course).
Certainly there have been attempts to produce PLs close to natural language (why aren't these attempts covered in the history section?, if think that's a big hole), but experts mostly agree that all of them fell sort (that's even in the article!): PLs and natural languages are in irreconcilable different categories. Evolution of PLs has only succeeded in adding abstraction handling, not "naturality", which would allow to "be ambiguous and make small errors, and still expect their intent to be understood". It might not be that in the future but at the point that you have something usable by a human that feels natural, it will no longer similar to a PL in the terms described in the article (semantics + syntax + type system + standard libraries).
So the article correctly describes the scope of what a PL is but it still doesn't show how a human use those elements to control the machine. We're putting the cart before the horse: it tells us about about what programming could be in the distant future, but it doesn't explain what programming is now. Diego (talk) 17:26, 31 July 2008 (UTC)
I wouldn't mind an addition to the history section that mentioned the recurring goal of making PLs more like NLs. Cited and neutral and all that, but I wouldn't mind citing someone who said that those attempts were generally unsuccessful. However, to be slightly pedantic, you can program a computer by speaking even today. There is, after all, such a thing as voice recognition software, and some disabled programmers for example, have no other way of writing programs. So it really just boils down to what you have to say to the computer to program it.
Indeed such speaking is not nearly as quick or effortless as in popular fiction, but there is no obvious dividing line between what you can do now and what some people hope will be possible in "future programming languages" in which "Computer: Go check my email for messages from John Smith, and for each message archive it if it is about last weeks meeting" would be a fine instruction. In fact, that slightly structured command is not all that far from what some high-level libraries already do. LotLE×talk 22:01, 1 August 2008 (UTC)

Definition of the topic in lead

I've added a new section with a brief summary of the Computer programming article, and a accompanying new sentence to the lead. IMO this addresses the shortcoming that I explained above, and explains several used terms that were unexplained in the article.Diego (talk) 09:19, 1 August 2008 (UTC)

I find this addition to the lead to be confusing and unnecessary:

"Programming refers to the activity by which the language is used to detail the desired behavior in the form of a program.

It is strange to be reading an article on PL, suddenly to jump into a description of "computer programming" instead. Obviously, there is a relation between the two topics, but we should keep this article on its own topic, not try to "transcluded" a different one. LotLE×talk 12:39, 1 August 2008 (UTC)

I don't understand why you find it strange, given that "programming" contains half of the meaning of the topic at hand (and half of the name!), "language" being the other half. This second meaning is the primary (only?) focus of the article, while the first is mainly ignored.
I accept that maybe my additions, which were mainly definitions of the concept of programming, could not be the best way to portray the relation between "programming" and "programming language".
How would you explain this relation here?, because without that explanation, there's no context of how PLs are used. How would you approach the introduction of the terms "programming", "program", "programmer" and "software", which are used in the article without explaining their relation to the subject? Please be constructive. It's difficult to evolve the article to cover a missing concept when every edit in this direction keeps deleted.Diego (talk) 14:02, 1 August 2008 (UTC)
Derek farn: my addition was not a mere cutting and pasting of another article. It describes half the definition of this topic, which was undefined before.Diego (talk) 14:03, 1 August 2008 (UTC)
I cannot see any real need to discuss or define "computer programming" as an activity in this article. There is already another article about that.
I think you commented somewhere, Diego Moya, that you wanted the "practical side" of this topic covered; to my mind, this is not a topic with a practical side in that sense. PLs are an abstract creature, and the article should address the topic. Perhaps the "See also" section would be appropriate to include a link to "computer programming".
I don't feel that this would suffice. If both you and Derek keep deleting all reference to way PLs are used without addressing my concerns, I will add a POV tag (weird for a technical subject, isn't it?), since your position is a particular POV and mine is not being covered: definitely should be a link to computer programming, because now there isn't a way to get there from here; and PLs are created for a practical purpose (creating programs), which is not addressed in the Purpose section (only a vague "provide instructions to a computer" is used each time, never explaining how it's done).
By analogy, the article on partial derivative is about the abstract mathematical creature and does not digress into discussion of the various and myriad uses the mathematical technique has in engineering, etc.
I would agree if this was an article about the Theory of programming languages, which is a topic on its own. Until the two topics get separate pages, this article must be about the general topic of programming languages, not only the theoretical side. AFAIK partial derivatives were created as a mathematical tool; programming languages were created as an engineering tool, so I don't think that your analogy applies here. AND the general topic under which derivatives fall, which is Differential_calculus and is accessible from partial derivative, *does* cover its practical usage and significance.
It appears that Derek.Farn at least, who has been a long-time and high-quality editor of this article, shares a similar opinion. I'd like to hear from him (or other editors) at more length on this talk page, but I concur that the material that has been added is somewhat poorly written and does not flow well in this article. LotLE×talk 17:20, 1 August 2008 (UTC)
Yes, I would also like to hear his reasons. I've asked for your opinion on how my concerns could be expressed. If you don't mind maybe we could ask for a third opinion? Diego (talk) 18:46, 1 August 2008 (UTC)
As I said earlier I agree with User talk:Lulu of the Lotus-Eaters's analysis. He is doing a sterling job trying to explain why your (Diego) edits decrease the quality of the article. Derek farn (talk) 20:34, 1 August 2008 (UTC)
Even if that were true, that explanations don't cover why you're deleting my edits instead of rewording them to your liking without destroying the ideas in them. Until now the only reason expressed to remove those ideas is a matter of opinion, in that this article shouldn't cover practicalities of usage, for which I strongly disagree. Diego (talk) 21:43, 1 August 2008 (UTC)

Since the only remaining opposition in linking to (not elaborating about) Computer programming seem based on bad wording, I've been keeping trying with different wordings to see if someone is of your liking, or if you will mind to rewrite it. Is there a consensus that edits should be added to the article only after achieving consensus at the talk page? If not, I can't see why you're reverting every single addition I made to the page instead of just fixing the expressions you don't like in them. Diego (talk) 20:54, 1 August 2008 (UTC)

As I have said, in my opinion, the correct weight for the association of PL with Computer programming is as a "See Also" link, which you have added. It's not mostly about the specific wording, I just don't see the concept as sufficiently important to this article to be in the lead (conceivably a brief mention lower in the body though). LotLE×talk 21:53, 1 August 2008 (UTC)
So your position could be summarized saying that programming is a tangential topic in programming languages, because PLs don't have a practical side? Forgive me, but that's extremely POV and doesn't do justice to what should be an introduction to PLs for a general audience from different angles.
As I stated before, IMO a theoretical approach would be appropiate for the separate Theory of programming languages article but not for a general coverage that should work as a trampoline article. The current focus of the article fails to Provide context for the reader (it should "state facts which may be obvious to you, but are not necessarily obvious to the reader", such that programming languages are about programming).
And your involvement in keeping the status quo based just in that opinion of yours is not helping to reach consensus about my concerns. I don't want to cite here all relevant Wikipedia policies that would support my posture about generalizing the current focus of the article, just notice that your opinion about what this article should be is IMO not what is expected for the entry point about this general subject.
Just a final words to say that the article DOES work now in some way as a general introduction, it's just that it fails to cover some important points in that respect. I don't understand your negative to include those particular additions on the basis of your opinion of what the article scope should be. (talk) 08:37, 2 August 2008 (UTC)
You have misunderstood the term WP:POV, which is something slightly different in an editing context than in general usage; I'd recommend reading that guideline. The current state of this discussion is that two long-term editors on this article do not believe the addition you propose improves the article, while you believe it does. Perhaps rather than restate my opinion (which I think I stated pretty clearly) you could seek involvement of other editors who might be persuaded to the relevance of your addition and/or try to explain in terms someone else finds convincing why you feel the side topic is relevant. I just don't see it in what you've mentioned on this talk page, nor generally in terms of the article topic. LotLE×talk 18:28, 2 August 2008 (UTC)

I agree with Derek farn and LotLE that it's preferable to avoid getting into tangential definitions, particularly within the lead. As it stands, both the Definition and Purpose sections specifically mention the use of programming languages to write programs, and links to relevant articles that naturally consider the act of creating those programs. It would perhaps be helpful to link to the Programmer article within the Purpose section, since the word is used several times in a way that seems to assume its meaning is known to the reader. Similarly, there's perhaps scope for rewording a sentence somewhere in the Purpose section to make a link to computer programming (rather than a definition) fit within the flow of the text.--Allan McInnes (talk) 00:30, 3 August 2008 (UTC)

Programs and machines

Speaking of tangents, I'm going to go off on one here, and suggest that we consider revising the first sentence slightly to read:

A programming language is an artificial language that can be used to write programs which control the behavior of a machine, particularly a computer.

My proposed addition is intended to clarify the fact that PLs aren't used to directly control machines, but rather to create (intangible) artifacts that control machines. Opinions? --Allan McInnes (talk) 00:30, 3 August 2008 (UTC)

I can see some merit in your revision, Allan McInnes, but it seems to miss the case of interactive shells. One often uses constructs from programming languages such as Python, Bash, Lisp, Forth, etc. to perform machine actions, without ever saving a "stored program". If you count Bash (as you should), I think I personally might write more code this way than in "programs". Much of the time, the interactive actions are glorified calculator stuff, but I've also e.g. use interactive wrappers to peek and poke into machine registers and the like (i.e. low-level, "close to metal"). LotLE×talk 01:14, 3 August 2008 (UTC)
Yes, I gave the notion of interactive shells some thought as I put together my proposal. I don't see that they are excluded by the use of "program", only of "stored program" (which is a term that you've introduced). To take your bash example, the bash language doesn't "control the behavior of a machine", programs written in the bash language (be they a one-line imperative command, a dataflow pipeline of several commands, or a stored script) are the things that induce specific machine behaviors.
That said, I'm not overly concerned if the lead stays the way it is (arguably, "programming languages can be used to control a machine" in the same way that "the English language can be used to communicate an idea"). I just thought I'd throw the proposal out there to see what the reaction was.
--Allan McInnes (talk) 03:20, 3 August 2008 (UTC)
I'm happy to agree that a one-line bash command is a "program" (since it is), but I wonder if you'd be trading one clarification for another confusion. That is, I think many readers will assume "stored program" from "program", even though that's not really necessary to the meaning. LotLE×talk 06:12, 3 August 2008 (UTC)
You may well be right about the potential for confusion. As I said, I'm content to leave the lead as is for now. I appreciate your feedback though. --Allan McInnes (talk) 06:30, 3 August 2008 (UTC)
Good point Allan McInnes, it is programs that control machines, not programming languages. The only unease I have about your proposed correction is the link to computer programs implies that these are the only kind of programs. Programming languages exist for writing non-computer programs for entities that are not computers. We need an article for programs that include non-computer programs. Derek farn (talk) 09:59, 3 August 2008 (UTC)
I share your unease Derek, which is why the text reads "program" instead of "computer program". Unfortunately, the only relevant wikilink I'm aware of leads to computer program. It would be nice to have a more generic "program" article that covers programming things like (off the top of my head) automated looms, player pianos, automated test equipment, FPGAs (VHDL or Verilog are arguably programming languages), etc. --Allan McInnes (talk) 21:20, 3 August 2008 (UTC)
This is the kind of concerns I feel are under-represented or missing at all. By the WP style guide, all the content in the lead should be expanded later in the article according to its prominence. But the very first phrase which talks about how PLs "can be used to control the behavior of a machine" is barely addressed in the body of the article, only mentioned in very general terms such as "to provide instructions to a computer", never explaining how this is actually done. Just for the record, I'll put here [1] a link to the changes I did to put that assertion in context by creating a new Usage section. Derek and Lulu felt that its content was not relevant. I'll try to rewrite it in terms of the interactive shell/batch processing modes suggested by LotLE and the distinction between programming computers and other kinds of machines, also hinted in the lead but never further developed. Even if a whole article is created later on this topic, it should also be explained here. Anybody can think of a programming language that's used to control a machine that is not a computer? Diego (talk) 07:40, 4 August 2008 (UTC)
You ask "Anybody can think of a programming language that's used to control a machine that is not a computer?". Several examples come immediately to mind: the programming for Jacquard looms, the programming rolls for player pianos, the languages for early programmable calculators (before they achieved the capabilities of small computers), and languages for programmable logic controllers (again, the early ones that were used instead of more expensive computers). Granted, most everythng that gets programmed today contains a microcontroller or microprocessor, because they're so cheap and flexible. On the other hand, programming any kind of embedded system is arguably not programming a "computer", if that term refers to general purpose computers. --Allan McInnes (talk) 22:24, 4 August 2008 (UTC)
The Jacquard loom is the example usually given and I have used it in Program_(machine). I have just stuck my neck out and added an example of a programmable device that I don't think contains a program. What about programmable washing machines? The washing machine article is not sufficiently detailed for me to cite it. Derek farn (talk) 00:09, 5 August 2008 (UTC)
That makes me think of other "special purpose" PLs. Not sure what Derek farn's washing machine does, but for example, my microwave has the capability to defrost by running at N% power for X minutes, followed by M% power for Y minutes, then wait Z minutes, etc. If I was able to figure out that programming language, I could instruct the machine to do those tasks :-). While the microwave almost certainly nowadays has a general purpose CPU inside it, the programming language I use to instruct it is another example of a non-Turing-complete language. LotLE×talk (signature previously accidentally omitted).
Yet another example of a non-Turing-complete language that I've just come across: the G-code used to program CNC milling machines. --Allan McInnes (talk) 00:57, 15 August 2008 (UTC)

New Usage section

Here's a proposal to split the Purpose section in two, one dealing with how PLs are used and the other more focused in actually addressing their purpose:


Programming languages differ from most other forms of human expression in that they require a greater degree of precision and completeness. When using a natural language to communicate with other people, human authors and speakers can be ambiguous and make small errors, and still expect their intent to be understood. However, figuratively speaking, computers "do exactly what they are told to do", and cannot "understand" what code the programmer intended to write. The combination of the language definition, a program, and the program's inputs must fully specify the external behavior that occurs when the program is executed, to the extent allowed by the expressiveness of the language.

Programs for a computer can be executed in a batch process without human interaction, or the programmer can use the programming language to write commands in an interactive session of an interpreter. When a language is used to give commands to a software application (such as a shell) it's called a scripting language.


Besides the prominent purpose of programming languages to provide instructions to a computer, there have been attempts to design one "universal" computer language that serves all purposes, although all of them have failed to be accepted in this role. ...

The rationale to split the old section it in two is that the bits about "a greater degree of precision and completeness" aren't really about the purpose of the language. I've added the explanation about interpreted vs batch-executed programs that you were talking about above.

I've qualified the "must fully specify the external behavior that occurs when the program is executed" phrase with " the extent allowed by the expresivity of the language", since the external behavior is not fully specified by the program (the platform on which it runs also defines much of the behavior, and there a lot of intangibles such as performance and usage of resources). I've also dropped the "many languages have been designed from scratch..." since I can't see how it relates to Purpose, or otherwise provide relevant information. Please comment what do you think or how would you handle adding this information. Diego (talk) 13:55, 4 August 2008 (UTC)


I have just noticed that the article on machine excludes computers (in the first paragraph no less). Computers have the necessary attributes to be included within the set of entities covered by the subsequent listed properties of a machine. I think it is the machine article that needs correction, not the programming language (or other computing related articles) that use the term machine. Help in arguing my case most welcome. Derek farn (talk) 00:17, 5 August 2008 (UTC)

"Measuring language usage": Clarification, please

I'd like to see something more definitive on prevalence of various programming languages. The section "Measuring language usage" does say

"It is difficult to determine which programming languages are most widely used, and what usage means varies by context"

however, "difficult" is not the same as "impossible" or "meaningless". Can we either give some kind of estimates here, even if qualified, or explicitly state that the question is so "difficult" that it is in fact impossible or meaningless for our purposes. Thanks. -- (talk) 17:01, 13 August 2008 (UTC)

I would greatly prefer to avoid any estimates of the popularity/prevalence of particular languages. This article should be about general concepts, specific languages are sort-of incidental to this. It would be fine to put such estimates in, e.g. the article on Java (programming language) or Haskell (programming language), since popularity is an attribute of those languages themselves. Such rankings are just "interesting trivia" from the perspective of this article, not encyclopedic content. LotLE×talk 17:22, 13 August 2008 (UTC)
I would also like to see something more definitive. As the person who wrote much of the material in that section I wish it were more definitive. Suggestion for how to make it more definitive most welcome. User talk:Lulu of the Lotus-Eaters, language popularity is an issue that is frequently asked about and it is a general, non-trivial, concept. The existing material discusses the various ways of measuring language popularity and includes references to real counts and highlights the fact that popularity measurement can be answered in various ways, all subject to measurement bias. Derek farn (talk) 18:23, 13 August 2008 (UTC)
Why do you want it more "definitive"!? What benefit would it provide to this article if we added "According to a study by A.Jones, C++ is twice as popular as Perl"? That sort of false specificity just detracts from the flow of the article... and balance would require citation of the dozen other studies that show varying results (perhaps because of using varying methodologies, such as those discussed).
That said, if we provided footnotes do a few of those studies, perhaps attached to our brief descriptions of the several methodologies, I think that would be fine. We shouldn't clutter this article, but letting readers locate an external source that, e.g. counts ads for programmers, shouldn't hurt. LotLE×talk 18:28, 13 August 2008 (UTC)
How could you disagree with the desire to make the contents of an article more definitive? If there existed an agreed upon method of measuring language popularity along with data meeting appropriate statistical significance, then it would be our responsibility to say so. Derek farn (talk) 19:33, 13 August 2008 (UTC)
Well, yeah. And if the moon were made of green cheese, I suppose that would belong in the moon article. I don't see your point... the most definitely is not any "agreed upon method of measuring language popularity", and introducing one particular study among dozens or hundreds adds false specificity as I have written. LotLE×talk 20:04, 13 August 2008 (UTC)
LotLE, would you have any objections to a separate article on this subject? (Assuming that it met Wikipedia policies for verifiability, etc etc.) -- (talk) 16:27, 20 August 2008 (UTC)

(out) I think an article along the lines of Measuring programming language popularity could well be encyclopedic. Obviously, it would need the right tone, neutral citations, and so on. I can imagine a reasonable article that perhaps had sections for different general methodologies, some data from particular studies under each methodology, that sort of thing. If you create such a thing, I would certainly not mind including a relevant link. LotLE×talk 17:42, 20 August 2008 (UTC)

Yes, that's along the lines I was thinking. I'm personally not competent to create it. But I think that it could conceivably be interesting. -- (talk) 21:08, 21 August 2008 (UTC)
Of course you're competent to create it! A first version need not be perfect. For a stub, you could more-or-less just copy the section in this article, and start working on fleshing it out over time. Hopefully other editors would add to it. Don't be shy, give it a try. LotLE×talk 21:21, 21 August 2008 (UTC)

concept of translation

I am a lay person who is trying to understand the nature of programming languages. analogy to natural languages in general, and human language (something I think I understand), is the most crucial to my understanding. A computer is this mysterious box with magical properties, and since so many of the concepts are abstract, analogy to well-understood human processes becomes even more important for the lay person. Recently I have discovered the concept of a relatively simple set of instructions, that a machine responds to. I'm speaking, of course, of machine language. This article is the perfect forum to cement the concept that, just as a human being has a native language, a piece of hardware (the ever-magical computer) also has a native language. Mentioning machine language in the first paragraph may seem to some like an unnecessary detail, but to me, a lay person, it is almost *the* crucial detail that enables to imagine the workings of a programming language. I am planning to add a reference to machine language in the first paragraph. If someone sees fit to remove it, I hope the removal will not be done wholesale, but with an eye toward appreciating that the primary goal of the lay person, in reading the first paragraph, is to form a complete, if only very general concept, of what a programming language is.

One person recently commented that it isn't true that all programming languages must first be translated into machine language, but the only circumstance I can think of where this isn't true is when a program is already in a machine language. —Preceding unsigned comment added by Pooryorick (talkcontribs) 18:24, 13 October 2008 (UTC)

Scripting language are not translated to machine code, many programs (in many different languages) are interpreted directly. To the author of the first paragraph: a machine language (or assembly language) is just another language and I think you are getting confused between the concrete behavior of a computer and the more abstract nature of evaluating the behavior of program written in some language. Derek farn (talk) 19:05, 13 October 2008 (UTC)
Moreover, many programs never get near a computer at all. I might write a program on the whiteboard to communicate ideas to my colleagues. That's a computer program even if no one ever compiles or interprets it to a specific machine. Interesting question: has anyone ever written an explicit programming language (not just pseudo-code) that never had a compiler/interpreter actually developed to go with it? Even if we don't have an example, such would most certainly be possible conceptually. LotLE×talk 00:04, 14 October 2008 (UTC)
I believe that nobody has written a compiler/interpreter capable of handling the complete Pl/1 language; they are all subsets. I understand that the same claim could be made for C++. Probably not quiet the kind of answer you were after, but close(ish). Derek farn (talk) 00:33, 14 October 2008 (UTC)
One example of an unimplemented language is Landin's ISWIM. It's been quite influential, but has never itself been implemented.
As a more general comment, I think the "machine language == native language" analogy is a bit misleading. Even native languages are acquired, rather than being built in. Furthermore, native languages and other acquired languages typically operate at the same level of abstraction, while the key difference between "machine language" and other programming languages that might get "translated" (elaborated is perhaps a better term) into machine language is that they operate at different levels of abstraction. If anything, "machine language" is more like the patterns of neuron firings that occur inside the brain, and over which native and acquired languages are overlayed. But I'm wary of that analogy too. --Allan McInnes (talk) 02:06, 14 October 2008 (UTC)

Thank you for the thought-provoking responses. Indeed, a scripting language may not generate a single new machine instruction, but just triggers the execution of preexisting machine instructions available in the interpreting program. As someone who wants to understand this field, I'm still struggling with the first paragraph because I assumed that a computer language was the set of instructions used to communicate with a piece of comptuer hardware. It turns out that a comptuer language may be a set of instructions to a piece of computer hardware, or it may be a set of statements which can be translated into a set of instructions to a piece of computer hardware, or it may be a set of instructions to another program, called an interpreter. The lay person needs to know, right off the bat, that a computer language, might be one of several things. At the very least they need to know that a computer language is not always understood directly by a piece of computer hardware. I'll probably ake a stab at this, but would appreciate any other attempts to make the first paragraph a little more enlightening without going into too much detail. Pooryorick (talk) 15:12, 15 October 2008 (UTC)

I concur with that sentiment. IMHO this information should be located right before the second sentence ("Programming languages are defined by syntactic and semantic rules..."). How about a reference to the execution of the program? This concept is explained in the Usage section, but it should also be mentioned in the lead, like this:

A programming language is an artificial language that can be used to write programs which control the behavior of a machine, particularly a computer, in a process called executing the program.

This mention should be enough to convey the notion that programs follow some specific rules to control the machine; the following sentence then provides the detail that the execution is related to the properties that define the language (syntax and semantics). Diego (talk) 16:03, 15 October 2008 (UTC)
Firstly the process of executing programs is a digression and something that is overly detailed to belong in introductory material. The concept of program execution is covered in program (machine). On a technical point, the term executing is not universal and the terms interpreting and run (to name two) are also used. Derek farn (talk) 16:32, 15 October 2008 (UTC)
Not sure if I'm following you. In which sense the term 'executing' is not 'universal'? And I can't agree that this concept is a digression: IMO, it is tied to the very core of programming languages - they are created for execution (if that were not the case, they'd be mere description languages, not programming ones). Diego (talk) 21:34, 15 October 2008 (UTC)

Continuing with these ideas, I just attempted another change, already reverted, but which I think has some merit. The first paragraph mentions both "programming language" and "machine", implying an important and probably direct relationship. I initially took this at face value, getting the wrong impression that programming languages are used to create instructions that a machine responds to. The first sentence does not say that, and technically may not even imply it, but that's what I initially understood from it. As has been shown in this discussion, the relationship between programs and computer behavior is not that tight. First, a programming language might not even have an implementation, and second, some programs don't generate a single machine instruction. In fact, some programs are written directly to control the behavior of other programs (a program written in Python controls the behavior of the program, "Python"), and only indirectly, control the behavior of the machine. Currently the focus of the first paragraph is on "what", as in "what a computer language is", but a lay person often understands most qucikly what something is, but getting some glimpse of "how" it works. The first paragraph does not currently convey what I, a newcomer to the subject, needed to know right off the bat to avoid misconceptions. Responses much appreciated. Pooryorick (talk) 17:06, 15 October 2008 (UTC)

I want this article (and all articles) to be formally and precisely correct. An encyclopedia isn't a tutorial, but rather a reference work. "How it works" is something better fitted to a tutorial. In any case a "programming language" is a fairly abstract thing, and should be addressed at that level, but with wikilinks to appropriately more concrete topics that it touches on. LotLE×talk 17:21, 15 October 2008 (UTC)
Is it formally correct to say that a program written in Perl controls the behavior of a machine when it really controls the behavior of the Perl interpreter? Or is it formally correct to say that a program controls the behavior of a machine when an implementation of that language has never been written? Pooryorick (talk) 17:38, 15 October 2008 (UTC)
I see your point. Likewise, a C program doesn't control the behavior or a machine, but rather the behavior of a C compiler (i.e. which bytes of machine code the compiler emits). Do you have an edea for a different phrasing? Something more simple and direct, not a complex circumlocution. LotLE×talk 20:46, 15 October 2008 (UTC)
How about this?: The execution of a program produces effects corresponding to the meaning of its rules. Those effects can directly alter the state of the machine, or guide the sequence of instructions in another program. Diego (talk) 21:10, 15 October 2008 (UTC)
The answer to your question hinges on whether we consider "machine" to mean a piece of hardware, or to mean something a more abstract computational entity (like a Turing machine) of which the hardware is simply an implementation. If the latter, then it is indeed formally correct to say that a Perl program controls the behavior of a "machine", since the Perl interpreter may be considered a "machine". Such ideas become particularly relevant when you consider that the "machine language" of some processors is in fact a higher-level abstraction on top of an internal microcode program. That's kind of the point I was trying to make earlier when I mentioned that one of the key aspects of programming langauegs that differentiates them from natural languages is the layering of abstractions. The "target machine" for executing a particular program is an abstract computational model (a stack machine, a register machine, the Perl interpreter, the Java virtual machine, the Bash shell interpreter, the Matlab command environment, a database management system) that may be implemented in a number of different ways (as hardware - e.g. Java chips - as software that runs directly on hardware - the kind of programming you seem to have initially been thinking of - or as software that runs on top of other software). In the case of ISWIM, even though it was never implemented, the meaning of ISWIM programs was defined in terms of the way it controlled the (abstract, not-then-implemented) SECD machine. A programming language without semantics (i.e. without a definition of how its programs "control" some "machine") isn't a programming language, it's just a structured syntax. I'm struggling with figuring out how to get those ideas across in the lead in a way that the layman will understand... --Allan McInnes (talk) 23:05, 15 October 2008 (UTC)
To LoTLE: I agree that Wikipedia must not be a tutorial (i.e. a sequence of detailed instructions on how to a complete a task), but its explanation *does* need to be understandable by the layman, as per the style guides. As Pooryorick pointed out, the current introduction doesn't accomplish that goal in it's current form. I'd rather go with the criteria of a novice rather than an expert about what constitutes "easy to understand" or "enough information to explain a concept" (or even "precisely correct!" ;-).
And please allow me to disagree with you: "How it works" is exactly what should be in an encyclopedia; if you're going to say just "What it is", you'd better write a philosophy treatise. "How you'd do it" is what belongs in a tutorial, but explaining that programs are executed is not "unnecessary detail" nor "a step required to complete a task"; the execution process is essential to the concept of programming languages for automatic machines, and must be addressed in the lead. Diego (talk) 20:43, 15 October 2008 (UTC)

The lead

After digesting the well-considered responses on this thread, it occurs to me that we might be having all this difficulty with the first sentence because, as LOTLE alluded, it needs less information, not more. If a program doesn't necessarily have to be intended to control the behavior of a machine, but can just be used as a thought experiment, and some programming languages have never been implemented on anything other than a chalkboard, why not generalize the description to something easily understandable, and sufficient to describe all possible programming languages:
This sentence contains a link to program (machine), which might be the ideal place to focus on just exactly what can be done with programs by machines, humans, or whoever, and this article can focus on explaining the defining characteristics of different categories of programming languages. I also like this sentence because it uses the word "understand" which fits the idea of being a language better than "control", some programming languages being used for purposes of expression rather than control.
This sentence also conveys the other key: a criteria for distinguishing a programming language from another kind of language: It must, in theory, be understandable by a machine or, in a nice GEB play, by another program.
To Derek: Might I suggest that it would be more appropriate to contribute productively to this discussion than to accuse me privately of vandalism? —Preceding unsigned comment added by Pooryorick (talkcontribs) 22:57, 15 October 2008 (UTC)
I would be fine with this minor change to the lead. Not sure I'm convinced it is needed, but I am at least convinced it is not objectionable. However, I'd like to hear if some other experienced editors chime in (e.g. Allan McInnes or Derek farn). LotLE×talk 05:21, 16 October 2008 (UTC)
I'm a bit iffy on the use of the word "understood": the whole point of a computer (or, in the abstract, of a model of computation) is that it doesn't "understand", it mechanically applies rules to transform symbols into other symbols. Programs are understood by people. They're executed (or evaluated, or run) by machines. I know that this is a somewhat pedantic point. I understand where Pooryorick is coming from. I'm just concerned that in trying too hard to use the "language" analogy we'll end up misleading people. Granted, plenty of other lay explanations of programming languages seem to talk about computers "understanding" the language. Anthropomorphism is rife in computer science (I'm guilty of it myself on a regular basis). Which is why I'm "iffy", instead of flatly objecting. --Allan McInnes (talk) 06:09, 16 October 2008 (UTC)
It goes the other way around, as well. "Cybermorphism" is all the rage with some psychologists who draw on ideas emerging from computer science to advocate that humans are just glorified machines :) Pooryorick (talk) 10:10, 16 October 2008 (UTC)

By its very nature the introductory paragraph cannot be exact and will be open to several interpretations. We could probably produce a very legalistic introduction that while being technically correct is completely incomprehensible. The place to disambiguate possible interpretations of the introduction is in the body of the article. The current introduction is straightforward and relatively easily grasped. All of the proposals I have seen so far have introduced more problems than they have solved. Let's leave the introduction alone and work on improving the body of the article. Derek farn (talk) 11:13, 16 October 2008 (UTC)

The problem is that the first sentence is demonstrably false in at least two cases (discussed above), and has potential to propogate misconceptions. The following sentence avoids those two cases, conveys the essence of what a computer language is, and is more concise:
Allan expressed some unease about "understand". The Wikipedia article, Understanding states that "somebody who reacts appropriately to X understands X", which fits perfectly with the way we are discussing using the term. The article does go on to say that this definition might be inadequate in light of the Chinese_room argument, but that argument is also highly controversial. In light of that, does "understand" still sound iffy? Pooryorick (talk) 15:54, 16 October 2008 (UTC)
As I read the changed intro a few more times (with "understand" introduced), I like it less and less. I said I was OK with it, but once it's there, I realize how bad it is to leave out any notion of computation (e.g. "instruct") from the lead sentence. I'm putting back the version that's been here for a couple years or so (that resulted from a lot of negotiation and thought). LotLE×talk 08:11, 17 October 2008 (UTC)
Trying again with:

A programming language is an artificial language that can be used to express computations which may be understood by a machine or a program.

Is it any better? Pooryorick (talk) 13:44, 17 October 2008 (UTC)
I like the inclusion of the word "computations" in Pooryorick's version of the lead here, but not the part including "understood" (the anthropomorphism thing). I wouldn't mind just "A programming language is an artificial language that can be used to express computations." Still, I'm really not sure why there is any need to change the lead sentence at all... it's starting to feel like looking for a change just for the sake of changing it.

Actually, this combining might be better:

A programming language is an artificial language that expresses computations, and whose programs may be used to control the behavior of a machine, particularly a computer.

This has the computation part, which is precisely correct. And it also mentions machines/computers. However, the mention of programs (i.e. interpreters) being controlled is unneeded in the lead: an environment like Perl, JRE, a simulator, etc. is a machine (an abstract machine rather than a collection of silicon traces). LotLE×talk 17:04, 17 October 2008 (UTC)

"Understand" may be too vague for comfort, but "control" is flat out wrong. It's a subtle point, but language in general is not about control, and "programming language" specifically has broader use. "Control" belongs in Program, where it already is. In fact, most of the first sentence (it's been reverted again) is already in program, making it redundant (and unnecessary) here. To be conceptually accurate: "Express" (or "prescribe") is to "progamming language" as "control" is to "program (machine)". "Control" really needs to go. Pooryorick (talk) 19:03, 17 October 2008 (UTC)
But how do you manage the usage of programming languages in non-computing machines? I wouldn't say that a piano scroll "expresses" any meaning; the only thing it has in common with a computer language is that you can put it on a machine and it will follow a predefined sequence of operations. I don't see this basic idea clearly expressed in the article's introduction. Even if control is the nature of the program, it also affects the form and elements of the programming language - so it should be also mentioned in this article. Programs and their programming languages are both sides of the same coin. Diego (talk) 20:14, 17 October 2008 (UTC)

Perhaps "direct" instead of "control"? --Allan McInnes (talk) 04:49, 18 October 2008 (UTC)

Missing the point?

(Warning: car analogy below.)

What would you think if an article about, say, engines had a lead paragraph like this one?

An engine is a mechanical device that can be used as a component when building a machine, particularly an automobile. Engines are built from static parts and mobile parts, which hold their structure and provide their operational elements respectively. Many engines are mass produced (for example, General Motors); some are particularly built and tweaked for specific events (such as in Formula One).

Old-time editors of that article would delete any attempt to add the concepts of 'energy' and 'fuel' to that explanation, on the basis that this is 'unnecessary', 'too much detail' or describing 'how it works'. The concept of 'movement' would be discarded because it is 'already covered in the linked articles' of "automobile" and "mobility".

Wouldn't you agree that such introduction could be somehow missing the whole point? Diego (talk) 12:08, 16 October 2008 (UTC)

Perhaps this will help. Here's a small selection of definitions from texts on programming languages:
  • Paraphrasing from Abelson & Sussman's Structure and Interpretation of Computer Programs: "Programming languages (are a way of expressing programs that) prescribe the tasks we want our (computational) processes to perform. Computational processes are abstract beings that inhabit computers. As they evolve, processes manipulate other abstract things called data. The evolution of a process is directed by a pattern of rules called a program."
  • From Aaby's "Introduction to Programming Languages": "A programming language is a syntactic realization of one or more computational models."
  • From Moti Ben-Ari's "Understanding Programming Languages": "A program is a sequence of symbols that specifies a computation. A programming language is a set of rules that specify which sequences of symbols constitute a program, and what computation the program describes." or alternatively "A programming language is an abstraction mechanism. It enables a programmer to specify a computation abstractly, and to let a program (usually called an assembler, compiler or interpreter) implement the specification in the detailed form needed for execution on a computer."
The common ideas seem (to me) to be:
  1. PLs are a tool for specifying a computation (in a particular computational model)
  2. PLs consist of rules that define how computations may be specified, and what computations can be specified
  3. PLs allow computations to be expressed in an abstract form
Any thoughts? Other references? Alternative ideas? --Allan McInnes (talk) 21:14, 16 October 2008 (UTC)
Allan McInnes some of your quotes material relate to programs rather than programming languages. Programs are written in a programming language. I don't understand the hangup on the first sentence. It is a broad brush description of a programming language which subsequent material can flesh out. The bit about syntax/semantics was originally written by me and contained an analogy with human languages, the analogy part got edited out a few months ago in a discussion that seemed to want to throw away any connection with human analogies. I could dig out the original words if people think it worthwhile. Derek farn (talk) 22:36, 16 October 2008 (UTC)
Derek, I included the material about programs in the quotes I selected because the quoted definitions weren't given in isolation, but in the context of using PLs to write programs. I wanted to make sure that the context of the quote was understood. I'm not necessarily suggesting that any or all of these quotes is itself suitable for use in the lead. Rather, I'm simply trying to use the quotes to help identify what "the point" that Diego thinks we're missing might actually be.
Personally, I was reasonably happy with the lead we had before (which we've hashed over any number of times, and which I think does an ok job of covering ideas 1 and 2 above). But obviously some other editors are not happy with it, and I'd like to understand why they aren't happy so that we can either address their concerns or help them to understand why their concerns should not be addressed. --Allan McInnes (talk) 22:46, 16 October 2008 (UTC)
Allan, thanks for clarifying the point you wanted to make. Diego has made some valid points and I would be interested to see some proposed wording from him. My views on Pooryorick are available on his talk page and I have stopped responding to this questions on this issue. Derek farn (talk) 23:14, 16 October 2008 (UTC)
Each of these definitions is more satisfying than what this article offers. It's notable that they all avoid talking too much about computers. Thanks for putting these up. They'll help shape the further evolution of the definition in this article. Pooryorick (talk) 22:07, 16 October 2008 (UTC)
The point I intended to make through my analogy is mainly that you can't talk about programming languages without talking about execution; this concept is essential to the purpose of PLs. Yes, you can use them to express algorithms precisely, but you could also use maths for that; what's unique to PLs is that they undergo an execution process, and that execution is what "controls a machine". This is what lead me to include some weeks ago some references to "programs" and the distinction between natural speak vs batch processes: human languages are intended for communication (having a sender, receiver and medium) while programming languages are intended for computation (having instructions and a processing unit). In that sense, the quotations by Allan McInnes are a step in a good direction.
As I see it, this article suffers from a tension between two goals. On the one hand, LoTLE and Derek farn defend a vision of the article describing PLs as a general abstract concept applicable either to computers or player pianos. On the other hand some of us have a sense that PLs developed mainly in relation to computers, and that the programs that can be written and their execution process are essential to understand the nature of the language.
We can speak about "programming languages" in general and "programming languages in computing". The contents in this article are primarily about the later; I don't feel that the sentence "some are defined by a specification document, while others have a dominant implementation" is valid if we are also speaking of a 19th century programmable machine.
The abstract meaning of PLs explains what Perl and the Jacquard_loom have in common. But I don't believe there is much to say about that pure concept, so I think the introduction should make explicit the distinction between PLs in the abstract and PL's evolution as applied to computing, and explain the computational/executable nature of the later (vs the communicational nature of natural languages). Diego (talk) 12:00, 17 October 2008 (UTC)

So, how about this wording? This defers the technical details about syntax and semantics to the second paragraph. The new sentences cover the ideas I've explained above. Feel free to reword it as you wish:

A programming language is an artificial language that can be used to write programs which control the behavior of a machine, particularly a computer.[1]. The purpose of programming languages is the description and automatic execution of computations, as opposed to natural languages which serve as a communication vehicle between humans. Modern programming languages have evolved from the mechanisms that early automatic machines used to alter their working patterns. Their programs specified the particular sequence of actions that the machine must perform. This property is kept in programming languages, which allow for (flexible, general, complex) ways to describe processes.

I think the distinction made between programming and human languages is a false one. Information is manipulated and instructions given in both languages. At a stretch it could be claimed that comments were the computing form of human chit chat (ie, social conversation), ok a big stretch. The evolution discussion is a side track and I don't think it is correct, software engineers are famous for reinventing wheels and being driven by immediate needs. I like the second paragraph of the current article a lot, perhaps it should be moved to after the second sentence of the first paragraph (with the subsequent wording forming a new paragraph)? Derek farn (talk) 13:08, 17 October 2008 (UTC)

The study of programming languages has been tied to the history of computers. Programming languages are defined by syntactic and semantic rules which describe their structure and meaning respectively. Many programming languages have some form of written specification of their syntax and semantics; some are defined by a specification document (for example, an ISO Standard), while others have a dominant implementation (such as Perl).

Diego (talk) 12:21, 17 October 2008 (UTC)


  1. ^ ISO 5127—Information and documentation—Vocabulary, clause 01.05.10, defines a programming language as: an artificial language for expressing programs

About "out of place and inaccurate"...

If we're aiming to include only the relevant and accurate content in the lead paragraph, I'd say that the "Some authors restrict the term..." and "Thousand of languages..." paragraphs have to go. Per Wikipedia:Lead#Relative_emphasis, they should be in the introduction only if they were significant to the topic and extensively covered in the body, something which they're not. Turing-completeness is in no way a main subject in this article, only hinted at; and the creation of new languages is not mentioned again, not even once. Diego (talk) 21:33, 17 October 2008 (UTC)

Lead section proxy

There have been several interesting suggestions in the previous discussions that could lead to a precise and broad cover of the subject in the introduction. But it's impossible for those ideas to take form in a well redacted, coherent text under the current policies that protect the article's contents in its current form by reverting any significant contribution. While that protection has merit in that it saves a version that has endured a lot of thought, it's also impeding any further evolution. New ideas have to be put in a draft form, mixed and relentlessly edited until something good emerges. And that's simply not going to happen in the real article under these conditions.

To overcome that problem, I'm making here a copy of the lead section and intend to use it as a proxy to the real one, a place where to develop our half-baked, badly redacted attempts to include those desired concepts.

To all the interested in finding a better, more accurate and wider introduction to the article: here I'm asking you to follow the opposite approach, and be purposely inclusive. You can reword and reorder ideas as you wish, but try not to remove any of them. We'll see what emerges from this exercise and whether something can be made of the proposals listed above. Will have time to select the best picks if there's something usable for the article. Diego (talk) 02:39, 18 October 2008 (UTC)

Good idea Diego. I've modified the proxy lead slightly to better reflect the actual structure pf the article (which seems reasonable, since the lead should in some ways summarize the article). I'd like to see the syntax/semantics paragraph expanded slightly to clarify exactly what's meant by "structure" and "meaning", but don't have time to wordsmith it right now. --Allan McInnes (talk) 05:21, 18 October 2008 (UTC)
It is a good idea. I want to point out that the vast majority of this article is about the kinds of abstractions found in programming languages. The abstractions are what is of interest in a programming language, and why, even though programming languages can trace their roots to low-level efforts to control machines directly, The fact that programs can influence programs, rather than just physical machines, opens up new universes of possibilty. People who want to know the nuts and bolts of the relationship between program and execution can go to Program, but here we want to explore what abstractions can be employed to better communicate with machines. Consider that programming languages evolve considerably more rapidly than the instruction sets they ultimately employ. language (abstraction) has a life of its own which transcends its various uses.

"By relieving the brain of all unnecesary work, a good notation sets it free to concentrate on more advanced problems, and in effect increases the mental power of the race." -- A. N. Whitehead (

Programming language

A programming language is an artificial language that can be used to construct programs which direct the behavior of a machine, particularly a computer.[1] Programming languages are also used to facilitate communication about the task of organizing and manipulating information, and to express algorithms precisely.

A programming language provides a structured mechanism for defining pieces of data, and the procedures or operations that may be carried out automatically on that data. Higher-level languages allow a programmer to combine several simple operations on a piece of data into a single more complex operation, which makes that task of creating complex programs easier.

Programming languages are defined by syntactic and semantic rules which describe their structure and meaning respectively. Many programming languages have some form of written specification of their syntax and semantics; some are defined by a specification document (for example, an ISO Standard), while others have a dominant implementation (such as Perl).

The earliest programming languages predate the invention of the computer, and were used to direct the behavior of machines such as automated looms and player pianos. In the wake of the invention of the modern digital computer thousands of different programming languages have been created,[2] with more being created every year.

End of the Lead section proxy


  1. ^ ISO 5127—Information and documentation—Vocabulary, clause 01.05.10, defines a programming language as: an artificial language for expressing programs
  2. ^ As of May 2006 The Encyclopedia of Computer Languages by Murdoch University, Australia lists 8512 computer languages.

Programming Language

I took that "created by people" part directly from the first sentence of artificial language :) Anyway, how do you justify transcluding the definition of program (machine) from the first sentence of that article without transcluding the definition of artificial language? Seems rather arbitrary to me. Pooryorick (talk) 17:52, 18 October 2008 (UTC)

As you've stated and shown in this discussion, you are new to this topic while a number of existing editors (including me) are very familiar with it. Trying to edit based mostly on what you personally are ignorant of isn't really a good plan.
The "artificial language" part is important inasmuch as it contrasts with natural language, but is not of sufficient centrality to elaborate in the first sentence. In any case, an artificial language need not be created by people; that addition is just plain factually false. In particular, it is well possible (and even happens) to construct a PL programmatically rather than by hand (by people). Maybe I'll go try to fix artificial language, but that's a different topic.
The relation to program however is much more central. A PL in which no programs are written is theoretically possible. I could perfectly well write down an arbitrary BNF grammar without ever writing anything that conforms with it. But more sensibly, the whole purpose of a PL is to let us write programs in the language. For that, a brief explanation of what a program is is needed in the first sentence (or at least first paragraph, depending on exact sentence structure). There is no "transclusion" here, FWIW; I haven't read "program" for a while so don't know if it uses the same clause, but the point isn't to use or not use the exact same words but to explain what we need to for this article. LotLE×talk 18:01, 18 October 2008 (UTC)
(Switching to third person to solicit participation) My guess is that LotLE is a computer scientist, and that's why he sees Program (machine) as being more central to the definition than artificial language. A Linguist (or Gerald Sussman) might see Artificial Language as more central. Programming languages are interesting as languages, regardless of who or what is capable of reacting to them. As computer languages incorporate more abstractions, they become more interesting in their own right. There are in existence today computer languages which could (and probably should) replace traditional mathematical notation. If they were adopted for that purpose, it would become obvious, even to those trained only in computer science, that the transcluded definition of Program (machine) in the first sentence of this article makes the definition of programming language overly specific. Pooryorick (talk) 19:30, 18 October 2008 (UTC)
FWIW, my doctorate is in Philosophy, neither Computer Science nor Linguistics. But in a general way, I've studied more linguistics than CS. It's hardly about my background though, but about presenting the important lead sentence about the topic (which has, after all, emerged over a lot of discussion over multiple years by many experts). Note: I still don't understand why Pooryorick keeps claiming the clause about "programs" is transcluded when it does not seem to occur in the program article at all. LotLE×talk 22:21, 18 October 2008 (UTC)
The transclusion is from Program (machine), not Program. One of the links above was wrong (I've changed it). Language is about expression, and mentioning control in the first sentence is misleading. There's no reason other than an arbitrary POV to deem "program" more central to the topic than "language". "Language", after all, is the noun, and program is merely the modifier. Many experts over multiple years may, nonetheless, have not gotten it quite right, especially where any committees were involved. Does anyone have any idea what Derek_farn means about having already discussed "computation" being undesirable in the first sentence? Pooryorick (talk) 03:43, 19 October 2008 (UTC)
I'm fine with the latest change. Computation seems better to me than "control" (and it's the change I proposed above, or something close). I think Derek farn might object because player pianos and looms (arguably) do not perform computations. However, I think those are peripheral enough to be mentioned only in the history/background... and I think there is a reasonable sense in which you can argue that even those are computations of a special (non-Turing) sort. LotLE×talk 04:01, 19 October 2008 (UTC)
And neither do SQL statements express computation. We have been here before, it is the declarative programming style that is being ignored here. If you want to discuss edge cases, what about the set of instructions used to program a microwave or washing machine, are they programming languages? Derek farn (talk) 08:13, 19 October 2008 (UTC)
I am also fine with going back to the version that had been stable for a year or more. I really don't see the necessity of change that a new editor who lacks a detailed knowledge of the topic seems to feel. On the other hand, declarative programming indeed also expresses computation; Prolog is Turing-complete even, for example. And the lambda calculus was invented specifically as an alternate approach to expressing computation from von Neumann machines (while being computationally equivalent). I'd say even the pure relational calculus is also just as computational as anything else that isn't Turing-complete (i.e. SQL, albeit there are slight "impurities" in the SQL standard, but it doesn't affect this point). LotLE×talk 08:24, 19 October 2008 (UTC)
Maybe there should be another article dedicated to computer programming languages. It may seem reasonable to have this article be primarily about computer programming language, because without computers we wouldn't probably wouldn't be discussing programming languages at all. By the same token, though, one would think that the Language article would be primarily about human language, but it isn't. It turns out that philosophers and linguists want to study the phenomenon of language in a broader context, so you have to go to Human_language, and even then you have to go further, to Natural_language, if you want to read about the most common use of language. There is a lot to discuss, philosophically, about programming languages which isn't necessarily of immediate interest to the typical programmer or even computer programming language designer. The key element which distinguishes programming language from other forms of language is the consistency constraint. Declarative vs, imperative, turing-complete vs. not turing complete, computational vs non-computational, etc., are all debatable dimensions, but the requirement of consistency is not. If Computer_programming_language had its own article, this article could focus on the development and implications of a previously unknown language constraint. —Preceding unsigned comment added by Pooryorick (talkcontribs) 14:35, 19 October 2008 (UTC)


To Derek_farn: How does the sentence "The abstractions present in the language allow a programmer to represent the concepts involved in a computation as a collection of the simple elements available (called primitives)" apply only to some languages? Can you provide an example of a language without abstraction and without primitives to express computations? Diego (talk) 11:55, 21 October 2008 (UTC)

Assembly language springs to mind and declarative languages express the 'what' rather than the 'how'. Derek farn (talk) 12:09, 21 October 2008 (UTC)
Assembly language is an abstraction (in your linked article: "a symbolic representation of the numeric machine codes") over the microcode and physical wires & transistors contained in the CPU, and declarative languages also express computations (the "what" and "how" distinction is an explanation used in teaching, not a precise scientific definition). To edit the lead paragraph you should think about the core principles that underlie the languages design, not just the common programming practices and folklore. Your response doesn't justify deleting my general assertion about abstraction in PLs, I'm adding the paragraph back. Diego (talk) 13:09, 21 October 2008 (UTC)
The definition of an assembly language very rarely includes a specification of how it must be implemented, ie microcode is irrelevant. The "what" and "how" distinction is used in teaching because it reflects what happens in real world programming. The "abstraction" paragraph reflects a very narrow view of what constitutes a programming language. Derek farn (talk) 01:44, 24 October 2008 (UTC)
In what sense is it "narrow"? You should explain exactly what terms in the deleted sentence were narrow and which ones were invented, otherwise it's a weak excuse. You have an exasperating habit to delete content written by other people and justify it with overly personal opinions. Wikipedia policy is that to preserve information: to be a good editor you should strive to correct information you don't agree with, instead of destroying it. Please read and understand that linked policy before doing your next revert, in special the "attempt to correct the misinformation or discuss the problems first before deletion" bit.
You say "some languages may not contain expressions", just right after agreeing that they "express algorithms precisely". How exactly do they express without expressions? And on assembly, you're requiring it to have a specification of the microcode for it to contain abstractions??? Obviously it doesn't depend on the implementations details, that's the reason a primitive is an abstraction: it captures what every possible implementation of a specific "information processing" would have in common. Maybe you're the one with a very narrow view of what constitutes an "expression" or an "abstraction". Feel free to discuss the ideas contained in that paragraph, but please don't remove it unless you have a better reason that "I don't think it looks good" - elaborate your complaints in as much detail as needed to reach consensus. Diego (talk) 07:31, 24 October 2008 (UTC)
And just for the record: the "task of organizing and manipulating information" is called a computation, according to its definition in Wikipedia. Diego (talk) 07:46, 24 October 2008 (UTC)
You are making a joke surely? expression (programming) means something very different than what is implied by the word "expression". The article computation does not contain the words you claim it does (and neither does the wiki dictionary). As for the microcode discussion, there is no requirement that any assembly language be implemented in microcode. Derek farn (talk) 12:18, 24 October 2008 (UTC)
Surely expression is not the same as expression (programming), but an introduction to a general article doesn't use words at its most technical meaning, as their audience is the general population. Any synonym would convey the same information, as long as the idea is conveyed that languages have compositions of simple elements. (And still, I can't think of any programming language that doesn't have expression (programming)s, as even visual languages do have them. Can you name one that doesn't? Anyway that's not relevant to my argument).
I don't know why you think that describing any language as having abstraction is narrow, and my problem is that you deleted the paragraph without explaining it properly (you still haven't: microcode is just *one* possible way to implement assembly, there are others, and the assembly operators are abstractions of all them). The "task of organizing and manipulating information" is not in the computation article, those are your words for programming language; computation says "any type of information processing", and that subsumes your definition. Diego (talk) 14:38, 24 October 2008 (UTC)

Important ideas in the lead paragraph

I've recovered the previous existing lead paragraph. It's a good idea trying to simplify that complex wording, but the definition "expressing computations" shouldn't be lost as it's better than the very imprecise and meaningless "communication, with a machine".

The ideas that a simplifying rewrite should retain, as per current consensus between the contributors above, are:

  • Programming languages are artificial languages,
  • which are created with the explicit purpose to express computations (which are abstract information processes),
  • in the form of programs
  • which are executed automatically in a machine.
  • They can also be used to communicate between humans, because they are the most precise form to express algorithms.
  • Every programming language has primitive constructs that, combined, describe data and data transformations (operations). (Note: declarative languages are not exceptions to this rule, their transformations describe what combinations and filtering of old data need to be used to create new data. Think of "computation" - which is 100% applicable to them).
  • This combination of simple primitives to express new meaning is an abstraction process. The primitives are abstractions over the details of the machine.
  • The existing primitives and their properties, their meaning, and the allowed ways to combine them are precisely specified through the syntax and semantics of the language.
  • This specification may be through a document, or as a working environment (an implementation).
  • Non-computer machines used primitive abstractions over physical mechanisms. Modern languages generalize the possibilities by using more powerful abstractions.
  • There are thousands of programming languages.

Can you provide a simplified rewrite using all these ideas? That would be great. We can discuss the relative merits and importance of each single idea, but all them are covered in the previous discussions and have more or less been agreed upon. Diego (talk) 13:22, 21 October 2008 (UTC)

Programming languages consist of a set of rules which govern the composition of instruction sequences ("programs") which can then be executed by computers, robots or other automata. As such, they form an intermediate stage between the abstract formulation of a computing task (devised by humans), and the actual operation of the machine. To accomodate for the varied nature of possible tasks and the different hardware employed, literally thousands of different programming languages have been developed.
All programming languages have in common primitive building blocks for the description of data and the processes applied to them (like the addition of two numbers). These primitives can be combined to implement algorithms to solve more complex tasks, like calculating a trajectory. Since even the primitives are more "powerful" than the machine instructions of the CPU itself, a programming language allows a more abstract and simplified formulation of any computable problem than pure machine code.
Since computers require precisely defined instructions, programming language specifications must be very strict and rigid. In cases where procedures must be communicated in such a manner, programming languages may also be employed from human to human.

Just a shot. --Syzygy (talk) 14:41, 22 October 2008 (UTC)