Jump to content

Talk:Programming language/Archive 7

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
Archive 1Archive 5Archive 6Archive 7Archive 8

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:

Usage


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.


Purpose


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 "...to 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)

Machine

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. -- 201.17.36.246 (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.) -- 201.17.36.246 (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. -- 201.17.36.246 (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)

References

  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 (http://sol.cs.trinity.edu/About/The_Courses/cs301/camn/)

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

References

  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)

Abstractions

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)

Human communication?

The article prominently states the idea, in the first paragraph no less, that programming languages are used to communicate between humans. But then that idea is completely ignored in the rest of the article to the point that it never clarifies which forms of human communication are allowed by PLs. This imbalance should be addressed in the article body, or removed from the lead paragraph if it's not one of the main aspects of PLs. Diego (talk) 13:52, 28 October 2008 (UTC)

The article does not talk about communication with computers, computations or some of the other general items mentioned in the introduction. The introduction gives readers a quick, accurate overview of what a programming language is and what it is used for. The rest of the article covers various issues that people have considered important and wanted to write more about. This material is something of a mish-mash and has not been through the scrutiny that the introduction has. Derek farn (talk) 14:16, 28 October 2008 (UTC)
Well that's my point, I don't think "Programming languages can be used as a mode of human communication" is accurate. I don't understand what it means (i.e. what degree of communication is allowed), it can't be inferred from context, and it isn't explained in the article. One can only speculate what human communication has to do with programming languages. Diego (talk) 14:55, 28 October 2008 (UTC)
Perhaps we can have some sort of brief discussion of the many text books and college (and graduate) courses that utilize PLs as part of their means of communicating concepts (such as algorithms, mathematical relationships, etc). I'm not sure how it might be woven in, but Knuth's use of MMIX in TAoCP is interesting: it's a PL that is used throughout a widely read text, but that AFIAK has never actually been implemented in a compiler/interpreter. Even if someone actually did create a means of running MMIX, Knuth's primary purpose is certainly to describe and discuss algorithms and techniques for his human readership. LotLE×talk 18:02, 28 October 2008 (UTC)
That would be a welcome addition. We could also elaborate on the concept of pseudocode, which is strongly related to programming languages but is centered around the necessities of human communication instead of machine control. Diego (talk) 12:36, 4 November 2008 (UTC)
Where would a language such as Inform sit? Is it intended to be used to communicate with humans, computers or both? Derek farn (talk) 13:02, 4 November 2008 (UTC)
That makes me think of literate programming. Although the final product of Inform and LP is to produce a functional program to be executed, the form in which it's created is important. Diego (talk) 14:19, 4 November 2008 (UTC)

Given that this issue still persists, I think that a paragraph on pseudocode should be added somewhere in the body. Pcap ping 11:09, 11 September 2009 (UTC)

I'm just a reader (and a programmer), not an expert, but I have never heard of programming languages being used as a serious form of human communication (i.e. not merely used for humor). I think this needs a citation. John lindgren (talk) 13:37, 15 June 2011 (UTC)

John lindgren, programming languages are used to as a means of documenting an algorithm or protocol in books, papers and specifications. When used in this way many details tend to get abstracted away, e.g., definitions of the variables. A language usage that is closer to a form of 'normal' human communication is provided by the Inform language.Derek farn (talk) 14:52, 15 June 2011 (UTC)

I am also a reader and a programmer, but I can see how programming languages can be considered a means of communication. However, I would argue that it is a means of communication for a limited domain (primarily, instruction via examples). Jf1357 (talk) 00:31, 22 July 2011 (UTC)

Programming languages are designed for human communication. It was a primary driving consideration in developing high level programming language. Maintaining programs was and is an important factor in programming language design.
There are criptic programming languages. Criptic languages are not generally used except for write once programs.
ALGAL had a publication language specification and a machine executable programming language specification.
To sum it up we have human readable for maintance and instruction examples. We have comments for human communacation. But not all programming languages are meant to be human readably. Machine language can only be read be a small number of programmers. Even when assembly languages was common.Steamerandy (talk) 10:27, 22 June 2015 (UTC)

Computer language is not equal to programming language. please not redirect it to here

Why is "Computer language" redirected to "Programming language"? Not all computer languages can do computation or I/O, exist many computer languages are not programming languages, like data structure format languages, presentation languages (including style sheet languages), user interface languages, grammar describing languages, i.e. YAML, JSON, OGDL, CSS, HTML, XML, BBCode, XUL, XAML, Regular expression, BNF.--LungZeno (talk) 05:35, 15 November 2008 (UTC)

Maybe you should write an article for "Computer language" that mentions, but does not redirect to, "Programming language". LotLE×talk 06:29, 15 November 2008 (UTC)
Actually it is a synonym, see the ref I just added. The only sense in which a computer language is not a programming language is if "communicating with a computer" (2nd sense of computer language) does not equal/entail programming them. If you're willing to make this assumption, you're essentially assuming animism, i.e. that computers have free will. Pcap ping 21:49, 1 September 2009 (UTC)
See also: Talk:Computer_language#Please_delete_this_article. Pcap ping 21:56, 1 September 2009 (UTC)
Actually, it is not a synonym:
  1. Computer languages do not necessarily express computations (the application of operations to values within the framework of some computational model), while PLs are specifically designed to describe computations.
They express computations in the sense of computability, i.e. they express something that a computer can do. (The def you give in parentheses above is not from our article on computation, so it appears to be your WP:OR.) Pcap ping 23:45, 1 September 2009 (UTC)
No, it is not my OR. It is a paraphrase of Definition 1.1 from Aaby's Introduction to Programming Languages. One can find similar ideas in Felleisen's Programming Languages and Lambda Calculi ("In the same way that computation on physical machines can be described, ultimately, in terms of shuffling bits among memory locations, computation in the abstract can be described in terms of relations on text."), or in Abelson and Sussman's classic Structure and Interpretation of Computer Programs ("In programming, we deal with two kinds of elements: procedures and data. ... Informally, data is "stuff" that we want to manipulate, and procedures are descriptions of the rules for manipulating the data. "). --Allan McInnes (talk) 00:23, 2 September 2009 (UTC)
  1. Your reference makes PLs sound like a subset of computer languages (which would be in line with my first point).
Like I explained below using Turing machines, this is just a appearance; you cannot formally define a proper subset of "computer languages" which are just "programming languages". Pcap ping 23:45, 1 September 2009 (UTC)
These arguments do sound like WP:OR to me. Do you have references from the programming language literature that back up these ideas? --Allan McInnes (talk) 00:23, 2 September 2009 (UTC)
  1. The viewpoint expressed in your reference is by no means a unanimous one, since programming languages do not necessarily have to involve computers (I have added a reference to that effect).
The fact that you can define the syntax and semantics of semantics of programming languages mathematically has no bearing on this issue because computation can also be defined mathematically. So, there's no contradiction, i.e. the notion computation is not tied to a physical computer, and neither is the notion of a programming language. Pcap ping 00:03, 2 September 2009 (UTC)
You have missed my point, which is that programming languages are not inherently tied to computers. One can write programs in languages that are not ever executed on computers. So it's invalid to claim that "programming language" == "computer language" (you could perhaps claim that "programming language" == "computation language"). --Allan McInnes (talk) 00:42, 2 September 2009 (UTC)
PLs are tools for specifying and communicating computations. Not all commmunication with computers involves the specification of a computation. In some cases what is communicated to a computer is just data (for example a table of names and addresses), which is processed in accordance with computational rules specified elsewhere.
--Allan McInnes (talk) 22:59, 1 September 2009 (UTC)
In terms of a Turing machine a "programming language" presumably means "just" the language in which the state transitions and head move instructions are expressed (transition function), whereas computer language could also describe how data is encoded. But this distinction is entirely artificial, due to the existence of a universal Turing machine: it can "run" (that is simulate) any other Turing machine described on its tape. So any "programming language" for some machine is also a "computer language" for the universal Turing machine. Thus no clear distinction can be made between the two notions. Pcap ping 22:54, 1 September 2009 (UTC)
A Turing machine is a mathematical model of computation, not a computer. --Allan McInnes (talk) 00:56, 2 September 2009 (UTC)
The 1st sentence of this article reads "A programming language is an artificial language designed to express computations that can be performed by a machine, particularly a computer." So, now you're saying that a programming language must run a physical computer??? What happened to Ben Ari's idea that a PL can be defined mathematically. Is it false now? Pcap ping 01:43, 2 September 2009 (UTC)
No, I'm saying that a programming language does not have to run on a computer, so it is not valid to say that "programming language" == "computer language". The UTM is a model of computation, not a computer, so it's input language is not a "computer language". --Allan McInnes (talk) 01:55, 2 September 2009 (UTC)

Computation

The article this article links to defines it as "Computation is a general term for any type of information processing." So, a markup language does define a computation in that respect. Pcap ping 23:48, 1 September 2009 (UTC)

A markup language defines structured data, not the processing done on that data. Also, I wouldn't exactly consider a loose informal definition in Wikipedia a reliable resource. --Allan McInnes (talk) 00:46, 2 September 2009 (UTC)
Then don't link to computation if you don't agree with what it says in the context in which you use it; you've unliked artificial language for instance. Pcap ping 01:21, 2 September 2009 (UTC)
The remainder of the computation article elaborates on the definition, and makes it more clear what the term actually refers to. --Allan McInnes (talk) 01:51, 2 September 2009 (UTC)
Also, your definition of markup language gives semantics (structured data) to a syntax (markup). Why is it not a programming language? Is the DDL from SQL not a programming language? Pcap ping 01:27, 2 September 2009 (UTC)
Does the semantics define a computation? No. It defines a structure. Just because something has semantics it is not automatically a programming language. The point of any language is to communicate some kind of meaning (semantics). A linked-list is a data structure. Its semantics is that of defining a sequence of data values. One can ascribe other semantics to the list (for example by interpreting the data values as computational instructions, and the list sequence as the sequence in which computational steps should be performed), but that does not make the semantics of linked-lists that of programs. --Allan McInnes (talk) 01:51, 2 September 2009 (UTC)

Markup languages

The W3C definition of a markup language is: "A markup language is a syntax and/or set of rules to manage content and structure of a document or object (for example, HTML , SVG , or MathML)." The first part clearly defines it as formal language; the 2nd is a bit more interpretable, but the "and/or" strongly suggests program semantics (not necessarily formal semantics as our redirect makes it). If something having syntax and semantics does not qualify as a programming language, then it is what? Just a computer language in some vague sense of communicating with a computer? The sense of this communication appears pretty concrete to me, and it coincides with that of programming language. Pcap ping 00:18, 2 September 2009 (UTC)

You say "...the 2nd is a bit more interpretable..." and "...the "and/or" strongly suggests...". Statements like that tend to point towards WP:OR. Please see here for a concise discussion of the differences between markup languages and programming languages. --Allan McInnes (talk) 00:48, 2 September 2009 (UTC)
Ha, ha, ha! That guy's site is more authoritative than W3C's? Pcap ping 01:12, 2 September 2009 (UTC)
No. But it already covers all of the arguments that I have no desire to repeat here. For example, as he points out: No HTML specification has ever called HTML a programming language, or anything like that. --Allan McInnes (talk) 01:43, 2 September 2009 (UTC)
troff and LaTeX are markup languages that are sufficiently powerful that it is possible to perform all sorts of computation with them. Of course they are not intended for this use and perhaps that is what differentiates them from being a programming language. Markup languages are not intended to express general computations and nobody would use them for this purpose (unless it is part of some exercise or quiz), it just so happens that some have features that make this possible. Derek farn (talk) 01:48, 2 September 2009 (UTC)

Turing-completeness

I see someone does define it this way and the non-agreement on this is already discussed in the article. Pcap ping 00:41, 2 September 2009 (UTC)

I did not see this issue raised, and we'd need a ref to make a claim like this, but it may be reasonable for some to avoid calling non-Turing-complete languages "programming languages". This isn't normally done though. Would SQL or the calculus of constructions not qualify as programming languages? Most people probably don't disqualify these as programming languages. Pcap ping 00:18, 2 September 2009 (UTC)

Programming language and computer language intersection

The description here is inconsistent in not covering all programming languages. Some later described.

In the computer field for example binary code is a programming language. On the other hand a piano roll is a programming language. Industrial robotics programming. Various forms of programming languages exist. Programming a Dish network receiver for the recording of shows is a programming language.

High level computer programming languages were specificly developed to be human readable. Communicating both algorithms to a computer and between humans.

Programming languages are most commonly associated with computers. Supported by the many books on "programming languages" in their title being on computer programing.

Not all computer languages are programming languages. Computer communication usually involves massages that are computer lamguages. They have a defined syntax we call protocols.

While many computer languages are programming languages. Some ate not. Not all programming languages are computer languages.

Neither is a subset of the other. There is however a huge overlap of concepts.

They should be combined.

A programming language directs the operations of an automation.

A computer language being a less used term can refers to a computer programming language or a communication/network protocol language.

Is a flowchart a programming language?

I am seeing a problem with the wiki here. Like this one many topics have conceptually the same ideas in different contexts. Steamerandy (talk) 17:17, 26 May 2015 (UTC)

Hello! Quite frankly, I'never heard or seen a communication protocol called a computer language. Pretty much the same would apply to a programming language. — Dsimic (talk | contribs) 19:29, 26 May 2015 (UTC)
@Steamerandy: Hello, it's a complicated question. A language is sometime called a proramming language only if it is a Turing complete language, which is imho restrictive as it does not include languages like coq. The issue is discussed a lot on the web [Turingcomplete 1] [Turingcomplete 2] [Turingcomplete 3]TomT0m (talk) 18:44, 27 May 2015 (UTC)

Syn tags

(I see that got removed, but here's my rationale for tagging it.) I think that some read too much in those dictionary definition(s). That dictionary is not a mathematical text, so inferring from two semi-techincal definitions that computer languages are a proper superclass of programming languages is improper synthesis in my view. And so is interpreting Ben Ari's paragraph, which does not directly define a notion of "computer language" as opposed to programming language. Pcap ping 01:38, 2 September 2009 (UTC)

Your dictionary reference gave two definitions: it defined "programming language" in a manner very close to the definition this article used; it defined "computer language" in a broad way, part of which might be construed as referring to a programming language (although those exact words weren't used). So who's synthesizing here? --Allan McInnes (talk) 02:58, 2 September 2009 (UTC)

The bottom line: synonymy question

Besides User:Allan McInnes who quickly removed this change, which tried to claim that computer language may be synonymous with programming language, and replaced with this discussion (which in turn got removed by User:Lulu_of_the_Lotus-Eaters after I tagged it as synthesis) does everyone else agree that computer language is not commonly a synonym for programming language? Sure, computer language could also mean something else according to that dictionary, but that 2nd meaning is not incredibly relevant in this article. My point is that computer language is a synonym often enough for programming language for this fact to be mentioned in this article, and we have a reasonable source for the claim. We do not really have to discuss all other possible meanings of computer language here. (Like I wrote in the sections above, I find that 2nd meaning of computer language ill defined, but it's not truly germane for this article). Pcap ping 02:07, 2 September 2009 (UTC)

Also, Programming_language#Usage uses "computer language" without ever defining it! So, if it's not a synonym of programming language, then why use it as one?!? Pcap ping 02:07, 2 September 2009 (UTC)

So why not just fix the poor use of terms in the usage section? --Allan McInnes (talk) 03:06, 2 September 2009 (UTC)

Perhaps a formulation like "Programming languages are often called computer languages, although the latter term sometimes has a different meaning." satisfies everyone? Pcap ping 02:07, 2 September 2009 (UTC)

Do you actually have any references which state that "computer language" is used as a synonym for "programming language"? --Allan McInnes (talk) 03:06, 2 September 2009 (UTC)
YES. If you really want a source that explicitly say that: Robert A. Edmunds, The Prentice-Hall standard glossary of computer terminology, Prentice-Hall, 1985, p. 91 [2]. Pcap ping 09:25, 2 September 2009 (UTC)
Another ref, which is more discriminating in the sense of Ben Ari (i.e. programming languages are a superset of computer languages, not the other way around because of the finiteness of all of our computers):


The phrases I've omitted here for clarity [...] just give pointers to the sections of the paper where those models are defined in detail. In case the gbooks link doesn't work, the ref is: R. Narasimahan, Programming Languages and Computers: A Unified Metatheory, pp. 189--247 in Franz Alt, Morris Rubinoff (eds.) Advances in computers, Volume 8, Academic Press, 1994, ISBN 012012108, quote is from section 2.5, p. 211Pcap ping 10:33, 2 September 2009 (UTC)
Also, the same paper stresses on p. 193 (section 1.3.2) "a complete specification of a programming language must, by definition, include a specification of a processor--idealized, if you will--for that language." An he cites many references in support of this, including Dijkstra. I think this is what Mr. McInnes is trying to stress in the "Computation" section above, i.e. syntax specification alone is not a complete specification of a programming language. But defining a processor appears sufficient according to this source, e.g. saying that "this tag make text appears bold on screen" is defining a processor. In the end, I have to conclude that what Benjamin C. Pierce said about OOPL applies here too: discussions about what is a programming language and what isn't shed little light on the subject matter, and only serve to illustrate the cognitive biases of the participants. Pcap ping 10:33, 2 September 2009 (UTC)

SIGPLAN def

Perhaps the sigplan quote we have in the article's footnotes says it best: "computer programming languages - languages that permit the specification of a variety of different computations, thereby providing the user with significant control (immediate or delayed) over the computer's operation." Pcap ping 02:31, 2 September 2009 (UTC)
Note that what the sigplan quote describes are "computer programming languages", i.e. programming languages ("languages that permit the specification of a variety of different computations") used to define the way computer should operate ("providing the user with significant control (immediate or delayed) over the computer's operation"). That's not the same as a "computer language". --Allan McInnes (talk) 03:06, 2 September 2009 (UTC)

Claim that computer languages superset programming languages

Computer languages is definitely a broader category (a superset) than programming languages. Markup languages, grammar languages, and so on are also "computer languages". The relationship is containment, not identity. LotLE×talk 06:55, 2 September 2009 (UTC)

Pedantically speaking, it's perhaps more intersection than containment, since I think a case could be made that programming languages don't have to (although they often do) have anything to do with computers. For example, a lambda calculus program doesn't necessarily have to be written in a computer language. Typically if you want to run a lambda calculus program on a computer you end up having to encode the lambda expressions into some computer language that acts as the input language for the LC interpreter.
That said, I agree with your basic point. As I said, "I think a case could be made", but I've never seen anyone make that case. And I doubt it's really all that important to make such a distinction. The key point is, as you've stated, that there are computer languages which are not programming languages. --Allan McInnes (talk) 07:32, 2 September 2009 (UTC)
[citation needed] You need to produce an explicit reference arguing that "computer language" is strict superset of "programming language", using this terminology. I was able to find one author that explicitly considers the two synonymous. Pcap ping 09:30, 2 September 2009 (UTC)
I don't see that there's any need to establish that "computer language" is a strict superset. All that needs to be established is that there are computer languages which are not programming languages.
Given that it's already been established via several references that markup languages are not programming languages, are you now arguing that HTML and XML are not computer languages?
As for references:
I will concede that a number of references seem to use "computer language" when they really mean "programming language". But that largely seems to be slightly imprecise terminology arising from the fact that the authors didn't consider things like markup languages (or really any languages that aren't Turing complete) to be computer languages. So if you would like to argue that non-Turing-complete languages are not computer languages... --Allan McInnes (talk) 11:46, 2 September 2009 (UTC)
I leave it to someone else to decide whether or not it's worth discussing these terminological inconsistencies in the article. I would ask that if you do so, you place the discussion somewhere in the body of the article, rather than polluting the lead with pedantry. --Allan McInnes (talk) 11:46, 2 September 2009 (UTC)
I think the distinction is that the term Computer language is used when talking to non-computer literate people, it saves having to explain what programming is all about. I have certainly learned to use it that way. Derek farn (talk) 09:50, 2 September 2009 (UTC)
I'm okay with including Derek's observation and Lulu's claim in this article, as long we can come with a reasonable source for these. The are a couple of sources (two sections above) that consider computer languages (using precisely this terminology) either synonymous or a finitary version of programming languages. So, the view that computer languages properly superset programming languages is certainly not universal, thus we need a reference for it. Pcap ping 10:40, 2 September 2009 (UTC)
The same request for citation applies to Mr. McInnes' view that computer languages properly intersect programming languages. Pcap ping 10:55, 2 September 2009 (UTC)
Please note that, as I specifically stated, while I think the case could be made for intersection, I've not seen anyone explicitly make it. Probably because no one thought it was actually all that important to do so. --Allan McInnes (talk) 11:52, 2 September 2009 (UTC)
Okay, given the nebulousness of what a "computer language" might mean, let's include in the article statements that can be attributed to some source. It seems we should have no trouble finding some source that say that "computer languages include programming languages" to counterbalance the view that the inclusion is the other way around, for which I did find a good source (meaning published in reasonable venue and explains its reasoning in detail) two sections above. But despite the fact that many sources make definite statements "X is not a programming language", they don't say "instead X is a computer language". So, it's rather frustrating trying to find a source for Lulu's view. Pcap ping 14:57, 2 September 2009 (UTC)

Allen McInnes is probably right that strict superset is slightly too strong. Obviously, usage of "computer language" varies a lot though, in any case (many writer use the superset meaning, but others just allow non-identity). Derek farn is also correct that informally one might use "computer language" for laypersons who don't have a clear sense of "programming language"... I wouldn't object to a clause making that point, as long as it is in the body rather than the lead. LotLE×talk 20:37, 2 September 2009 (UTC)

Proposal then

I see you did give some sources above (the non-linear editing of threads here is confusing to me). So, we can just say in the lead something like: "Computer language is sometimes used as a synonym for programming language, but opinions vary as to whether all computer languages are programming languages or the other way around." The details (just one paragraph can go in the body of the "Definition section") roughly along the lines of what you added yesterday, but this time we can cite sources that explicitly use "computer language". Pcap ping 15:13, 2 September 2009 (UTC)A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely.

The earliest programming languages predate the invention of the computer, and were used to direct the behavior of machines such as Jacquard looms and player pianos. Thousands of different programming languages have been created, mainly in the computer field, with many more being created every year. Most programming languages describe computation in an imperative style, i.e., as a sequence of commands, although some languages, such as those that support functional programming or logic programming, use alternative forms of description.

The description of a programming language is usually split into the two components of syntax (form) and semantics (meaning). Some languages are defined by a specification document (for example, the C programming language is specified by an ISO Standard), while other languages, such as Perl 5 and earlier, have a dominant implementation that is used as a reference.

What kind of language is a programming language?

There's some dispute over linking to Constructed Language to illustrate the definition as an artificial language in the lead. In my opinion the definition of constructed language ("a language whose phonology, grammar, and/or vocabulary have been consciously devised by an individual or group, instead of having evolved naturally") fits perfectly for programming languages, so I think this is a valid link. The alternative is linking to formal language (the Language#Programming_languages describes programming languages as an "extreme case of a formal language"), but this was rejected here some time ago. Which term should be used to say what a programming language is, and how we get sure that the term we use is properly defined? Diego (talk) 18:35, 2 September 2009 (UTC)

While Esperanto may have some oddball formal similarity to Pascal, making that connection in this article (let alone in the lead) veers badly into WP:SYNTH territory. In our lead we are simply using the words "artificial" and "language" in their vernacular and informal sense. No link is needed, nor appropriate. LotLE×talk 20:41, 2 September 2009 (UTC)
I gave a ref above, so no SYNT or OR here in linking to language. Pcap ping 20:43, 2 September 2009 (UTC)
The link to Language looks OK to me, just none of that artificial/man-made/constructed stuff. However, many of your recent edits, Pohta ce-am pohtit, are definitely skirting WP:OVERLINK if not crossing the line. We really don't need to link every single word in the article, and we should especially watch that in the lead. LotLE×talk 20:49, 2 September 2009 (UTC)
In the vernacular sense languages are naturally evolved, so the juxtaposition of the "artificial" and "language" ideas needs at least some clarification if we don't want it to be confusing. Specially given that Wikipedia itself has a precise meaning for artificial language that seems to be different from what is implied here. If not in the lead (given that there's no other Wikipedia article describing what is special about these languages to which we could link), at least the Design and implementation section should address this concern. Diego (talk) 20:55, 2 September 2009 (UTC)
Well, not quite. WP's link for "artificial language" is a redirect to "constructed language" (at least at this moment). That seems slightly imperfect to me, but WP is a big place. What we mean by the ordinary word "artificial" is definitely not what that links to. But y'know... we really, really, really don't need to have a link for every single word in the article. We expect readers to read ordinary English. LotLE×talk 21:17, 2 September 2009 (UTC)
Yes, but when the ordinary English we write seems to produce contradictory meaning, readers should expect us to provide a clarification. Diego (talk) 21:30, 2 September 2009 (UTC)
That said, if you want to write a sentence outside the lead that explains the difference of PL's from natural languages, I'm fine with that. LotLE×talk 21:18, 2 September 2009 (UTC)

Does someone have access to Programming Languages, Natural Languages, and Mathematics by Peter Naur? It seems that it could prove a good reference to this topic, but I can't read articles from the ACM any longer in my current job. Diego (talk) 21:30, 2 September 2009 (UTC)

Nothing particularly useful because (i) it was a keynote address at POPL75 republished in CACM, and (ii) despite the title it's mainly about comparing the social aspects of these related endeavors (this was his goal). If you want to read that Esperanto is like Cobol or Fortran, and that linguists squabbled in 1910 on how to construct Esperanto like ISO committees did half century later, it's an interesting read. Otherwise he mainly complains that programmers go for fads, so programming should be more like Math, and later he complains that programing languages should be more flexible like natural languages. Not particularly deep. I can send the paper to you if you want. Pcap ping 22:22, 2 September 2009 (UTC)
I was expecting to find some good insight about language design from the man half-responsible for the Backus–Naur Form. The "programing languages should be more flexible like natural languages" certainly sounds exciting, could you send it to my gmail account? (user TuringT) Thanks Diego (talk) 22:35, 2 September 2009 (UTC)

I think the addition of a paragraph describing the similarities and differences between natural and programming languages is useful. Thanks for adding that. I tweaked a few words, but generally it seems to fit well where it occurs. LotLE×talk 01:08, 3 September 2009 (UTC)

There are multiple statements spread throughout the article comparing natural and programing languages. Wouldn't a (sub)section be a better organization of this material? Pcap ping 09:28, 3 September 2009 (UTC)
Probably yes. Diego (talk) 09:35, 3 September 2009 (UTC)

There is real confusion in the sentence near the beginning of the "Definitions" section that reads: "A computer programming language is a language[3] used to write computer programs." "Language" as used here is too general to mean much of anything, except the union of sets which includes programming languages and natural languages. The footnote goes to page 205 of Steven Roger Fischer's History of Language, but that entire book is devoted to understanding the nature of "natural" languages, and on that very page Fischer writes that "a programming language... is wholly different from all other forms of language known to humankind." At the very least the word "language" here should be deleted, the reference to Fischer made more nuanced (his entire section on programming languages is worth reading and relevant to this page and this particular topic). Since the "Definitions" section begins with "A programming language is a notation for writing programs, which are specifications of a computation or algorithm," more specific and more accurate, I'm not sure what good this sentence does in any case. Wichitalineman (talk) 22:28, 11 February 2013 (UTC)

A programming language is actually a formal language that is equipped with some semantics. That Fischer reference made no sense. I think I fixed it. Hans Adler 23:01, 11 February 2013 (UTC)
My issue is with the phrase that remains, "a programming language is a language." If "language" is taken to mean "natural language," then this is wrong. This is an old debate in linguistics and programming language design and you'd be hard-pressed to find linguistic support for the phrase as it currently exists, not least because programming languages (and formal languages) are generally writing systems whereas natural languages are spoken first and foremost (many of the world's ~6000 natural languages have no writing systems at all). "Notation," in the preceding sentence, is better, since it means system of writing. I don't actually think removing Fischer was a good idea, as he tries to explain the issue, but what he says is not reflected here. Wichitalineman (talk) 21:32, 16 February 2013 (UTC)
I think in this context it may be best to think of the word language as used in a very loose sense that generalises both natural and formal languages, or even as a metapher. Hans Adler 22:28, 16 February 2013 (UTC)
That's how it's being used, but that obscures rather than clarifies, and the goal of Wikipedia is clarity. To the general reader, it may imply "natural language," which would be false. Wichitalineman (talk) 21:19, 18 February 2013 (UTC)

Non-Procedural Programming Languages

This article seems to have a real bias toward procedural PLs, e.g. Fortran, PL/I, etc., and excludes non-procedural languages, which may satisfy all of your criteria of what constitutes a PL. The one in particular that I have in mind is IBM's CMS Pipelines, a/k/a Hartmann Pipelines. I have personally use Pipelines to implement solutions to large and difficult problems on a computer. What is there about Pipelines that makes it NOT a programming language? And yet allows Prolog? -dav4is (talk) 21:19, 6 May 2013 (UTC)

It has a bias towards major languages, and CMS Pipelines is too obscure to be included with due weight to the topic - the article can't just contain ALL languages that someone wants to mention, and that doesn't mean that they're not considered languages. Several non-procedural languages are included (Haskell, Prolog, arguably ML and APL) and they're recognized as languages just fine. A mention of CMS Pipelines would be more adequate at Dataflow programming than here. Diego (talk) 22:21, 6 May 2013 (UTC)

Understandable by humans

The phrase "understandable by humans" is used by Pascal Lando, Anne Lapujade, Gilles Kassel, and Frédéric Fürst, Towards a General Ontology of Computer Programs. Having skimmed the article, I understand the hyper-technical classification they are trying to do in formal ontology (which BTW, means something related, but still quite different, in computational linguistics than it does in philosophy... I have a doctorate in the latter, and have had jobs in the former). However, this one-off special meaning given in that article has very little, if anything, to do with the general usage of the terms "computer language" or "programming language". Just as a citation, it's harmless (but probably not all that relevant), but we should definitely not include its oddball classification in the article text. LotLE×talk 19:59, 3 September 2009 (UTC)

Just saying "X is a strict subset of Y" is meaningless in this context unless X and Y have some definition. So, for any cited declamations that "foo languages are bar languages" we need to detail (as briefly as possible, of course) what the cited authors understand by "foo languages" and "bar languages". There's no a priori common sense of foo and bar here. It was easy enough to explain concisely Narasimahan's paper: computer languages are finitary programming languages, where programming languages express computation on abstract machines -- I did not repeat/state the last part since it's exactly the same def as used in the paragraphs above it in the our article.
Now, there's nothing deeply technical about the paper of Lando et al. Most ontology papers are full of fluff, and this one is no exception. The whole ontology of computer/programming languages is in half a column in section 3.3, and doesn't require any of the stuff in the rest of the paper to understand. They define:
  • Computer languages - those formal languages designed for interpretation by a computer (microprocessor)
  • General Purpose Computer Languages (GPCLs) - Turing-complete computer languages dedicated to the writing of all kinds of programs
  • Programming languages - all GPCLs that are understandable by humans
The distinction between GPCLs and programming language is rather dubious, but it's not of much concern to us. If you read the ontology backwards, it gives "Programming languages are those Turing-complete computer languages dedicated to the writing of all kinds of programs, and which are understandable by humans." The purpose of programming languages appeared unnecessarily verbose to repeat, as it's not different in Lando et al. from that stated in the paragraphs of this wiki article that precede the citation. The novel(?) idea here is indeed the requirement that a programming language be something that humans understand. I don't see how this is outlandish. It is not that different from your view, just states what the specific difference is. Without a specific difference, the statement that "programming languages are computer languages" conveys almost zero information, since the subset of computer languages called programming languages may well not be proper, and the reader is left guessing as to what the distinction between these notions is in Lando's view. If you can express the above in a concise manner that does not omit the specific difference, please do so.
Sadly, Lando's paper is the only source produced by editors above to support that "programming languages are a strict subset of computer languages", and which defines the notions involved. The other source (Bajpai 2007, cited immediately after this one in the article) only says that markup languages are computer languages, and that they are not programming languages because they have a "different goal than creating a program". But this does not imply that programming languages are a subset of computer languages; they might as well just intersect them. It requires too much WP:SYNT to infer either case from Bajpai's declamations, plus this kind of book aimed at newbie programmers does not bother defining any of the concepts we care about in this context, like what Bajpai understands by computer or programming language.
If you can find a better source... Pcap ping 23:27, 3 September 2009 (UTC)

Perl "proofs"

I'm rather uncomfortable with those references, and the statement that the "grammar is Turing-complete" does not describe the problem well, because the actual issue is that the grammar can change! Those aren't exactly peer-reviewed papers, and the authors make unclear statements, which have been pointed out on LtU. The way that proof needs to be understood is that in perl the parsing rules (grammar productions) may be altered by the program being parsed. That's not the same thing as perl having an unrestricted grammar, which is probably what was meant by "Turing-complete" here. So, parsing perl in the general case essentially entails executing the program just obtain the full grammar for particular perl program. That's my reading of the "consensus" on LtU on that "paper", but there are some that disagree with this interpretation. This is pretty iffy material. Probably a ref on Lisp would be more adequate since it's easier to explain that macro expansion may not terminate in Lisp, so the compilation phase may not finish.[citation needed] Pcap ping 00:29, 6 September 2009 (UTC)

Probably the most coherent commentary was:

In his sense, the grammar of perl is indeed unrestricted. However, the claimed proof on perlmonks doesn't give code where the syntax may be invalid based on program input (or some random variable), only one where it differs (but is still valid) based on the outcome of some Turing machine. This guy (chromatic) gives however such an example using BEGIN to force execution of a snippet of code during compilation, which depending on a random variable may or may not give a syntax error later during the parsing of the rest of the code. Pcap ping 00:58, 6 September 2009 (UTC)

You could give its placement in the Chomsky hierarchy instead. Not that I know where it would go. --Cybercobra (talk) 01:23, 6 September 2009 (UTC)
I agree with Pcap above that inasmuch as we need to mention the issues of computational grammars at all (which is not clear to me), the Lisp macro example is clearer and better documented than the Perl case. LotLE×talk 07:19, 6 September 2009 (UTC)
This is not entirely clear because there's no clear definition of a valid Perl program. Is a Perl program that has BEGIN block that loops forever a valid Perl program? What if it has an "obvious" syntax error in the rest of the code? I put obvious in quotes because the parser will never get to the error. So there are two ways to see this. If a Perl program that has a non-terminating BEGIN block is considered invalid Perl program (regardless of what comes after), then the Perl grammar is type-0, aka unrestricted grammar aka in class RE (complexity), because there exists a Turing machine that parses any valid Perl program, but may not finish on invalid ones. On the other hand, if you consider a non-terminating BEGIN block a valid Perl program, then you're not guaranteed that the parser will terminate even on valid programs, so the formal language of Perl programs is outside the Chomsky hierarchy in the class ALL (complexity). Exactly the same observation applies to Lisp programs using non-terminating macros. Pcap ping 19:24, 10 September 2009 (UTC)
I really don't think that this example can be suitable for this article. You cannot show an example and then even solve it on Wikipedia. It looks odd Budugoo (talk) 03:30, 21 October 2010 (UTC)

Automated archiving?

Can someone knowledgeable in that set it up? The last manual archive is from nearly two years ago, and a lot of the 2008 discussions are no longer pertinent to the current article. Pcap ping 10:59, 11 September 2009 (UTC)

Recent change to generations

I'm a little concerned about this change and similar changes to Programming language generations. They're entirely sourced from http://psychology.wikia.com/wiki/Computer_programming_languages. I'm not very familiar with the issue, but it does appear to me WP:UNDUE or even WP:OR. Pcap ping 15:17, 23 September 2009 (UTC)

Sorry, but I'm rather confused. The material was replaced to soften its dependence on unsourced material, yet you've undone the change to make it more reliant on unsourced material. The reference to the article you question isn't mentioned on this page, but is in the material on the proposed Programming language generations. However the questionable source only supports the claim that the prior view is held by some authors. I thought that finding support for its retention, even if weak, would be better than removing it entirely. The edit to this page Programming language better conforms to the view described as "Historical" on the Programming language generations page, which is fairly heavily sourced to nine other papers published in reputable journals, mostly by experts in their fields. I quite believe the replacement is fully consistent with that material, but also happens (in an NPOV sort-of way) to be consistent with the earlier unsourced material. Have I convinced you to re-instate the changes made on this page? If not, what can I make clearer? I had considered re-copying the references from the Programming language generations page to the Programming language page, but that had seemed overkill, since this one refers to that one. However, if that's what should be done, it's easy enough.CSProfBill (talk) 16:45, 23 September 2009 (UTC)
"However the questionable source only supports the claim that the prior view is held by some authors." The wikia source is the only source for the the alternative/new view. Unless more authors support that view it seems entirely WP:UNDUE (or even WP:OR) to put in doubt here the traditional/prior categorization by generations. (See the three-bullet list at WP:UNDUE.) Pcap ping 17:01, 23 September 2009 (UTC)

This discussion appears to be happening in the wrong place, primarily. The concern addressed seems to be about whether the article Programming language generations contains original research. As far as it goes, that other article seems pretty well cited, though it has stylistic problems as of right now. However, for this talk page, let's only discuss the pretty narrow stylistic change made and reverted on this article, not the citation quality of a linked article. LotLE×talk 17:23, 23 September 2009 (UTC)

The "stylistic" change here was changing "that is, the first generation language " to "viewed by some to be a first generation of languages" and so forth. The weakening of the claim is entirely and indirectly based on that wikia source (via the sub-article). Hence my revert. Pcap ping 17:29, 23 September 2009 (UTC)
I don't understand what wikia article you are mentioning, or why. Wikia is definitely not a WP:RS, but it also doesn't occur here, so that seems moot. On the stylistic matter itself, I agree that "viewed by some" is unnecessarily mealy-mouthed, and the simple statement is much better. LotLE×talk 17:37, 23 September 2009 (UTC)
The one cited here that was cited here. Pcap ping 18:46, 23 September 2009 (UTC)
I'm happy to accept any other phrasing. The problem is simple. The prior text relies on unsourced material. The sourced material (e.g. Grace Hopper) supports the notion that the machine language programs are NOT written in first-generation programming languages. However, according to the existing (unchanged) first-generation programming languages, which is the origin of the similar statement on this page, they are. What is the preferred way to deal with the prior text, which already exists also elsewhere, is unsupported, but may be supportable? The changes I made to the claims were supported (except for the claim that someone held the view that the prior (unsourced) text espoused). As it stands without reintroducing the change I made, the current claims are unsourced, and there are other well-sourced opinions making contradictory claims, which are consistent with the text I had put in.CSProfBill (talk) 18:07, 23 September 2009 (UTC)
I see. I misunderstood what you were trying to do. Let me mull this over a bit, and see if there's a reasonable source that considers assembly languages first generation. If not, this article needs to be changed to reflect what is verifiable rather than trying to support what's already written by circular referencing (the wikia article was copied from here). Pcap ping 18:45, 23 September 2009 (UTC)
Quick note: the current text in this article on language generation seems indeed entirely unsourced. The reference given in that paragraph is an O'Reilly poster which does not divide the languages in generations. Pcap ping 18:56, 23 September 2009 (UTC)
However, the view that assembly machine code is a 1GL, and that macro assembly is 2GL, which is used in this article (edited 19:16, 23 September 2009 (UTC)) can be sourced, e.g. from this book. Pcap ping 18:58, 23 September 2009 (UTC)
So, I think it's best we hammer out this stuff at Programming language generations, and then write a WP:SUMMARY here. I don't have a lot of time on hands today though... Pcap ping 19:00, 23 September 2009 (UTC)
I'm sorry if I didn't explain this clearly. Happy to move the discussion there and let it sit for a little bit - after tonight I also get short on time again since I've neglected other things to spend time writing and finding sources for the material that I didn't move from the other wikipedia pages. Please note that the issue is that machine languages were claimed to be first generation in the old text but (according to Hopper) that wasn't programming. Authors like Nauer saw assembler languages as forming a "new epoch". This gave rise to the "first generation", which the old text claims as "second", etc. The Rico reference has a good overall picture. What I couldn't find was anyone until the recent material, e.g. in the current wikipedia pages, that advocates the view that's used there. But it must have come from somewhere. So the issue is finding, for example, a reliable source for treating machine languages as first generation to replace the weak source with a stronger one. Or perhaps we should just replace the weak reference with "citation needed"? But it's a shame to leave the changes to the summary on this page go unmade since they don't even refer to the troublesome source? Thanks. CSProfBill (talk) 19:08, 23 September 2009 (UTC)
Yeah, I contributed to the confusion by writing something else above that what's written in that book and in this article. I've corrected it now. But the book does support the current text in this article and the unsourced 2nd part in Programming language generations. Pcap ping 19:18, 23 September 2009 (UTC)
Thanks for finding that. Part of the reason I wrote the "generations" page in that form was that these two, contradictory, namings seem to appear in the literature, and although I couldn't find a source, I presumed that the existing description was good. I would soon hope to replace the first-, second-, and third-generation pages with redirects to this comparative page. Thanks again. CSProfBill (talk) 19:29, 23 September 2009 (UTC)
I don't concern myself much with this kind of categorization issues. Presumably, in this article we should use the view that's commonly found in current textbooks (assuming they even agree), but I don't have a strong opinion on this. Pcap ping 19:33, 23 September 2009 (UTC)
But in the light of the Rico reference (Rico, DF; HH Sayani, RF Field (2008). "History of computers, electronic commerce and agile methods". Advances in Computers (Academic Press) 73: Emerging Technologies), even current texts use both sets of names, hence my attempt to put on this page a text that got the gist of the history in, but avoided actually tying it to the generation names, which is off on the other page. CSProfBill (talk) 19:44, 23 September 2009 (UTC)
If there's no agreement, by all means, mention both schemes. I don't even see the three generations of PLs defined in that Rico et al. ref though. Only computers are split in 4 generations. Pcap ping 20:32, 23 September 2009 (UTC)
The diagram I was referring to is on page 5, through the book at http://books.google.com/books?id=Zf5MlsaAmNgC&pg=PT13&lpg=PT13&dq=%22History+of+computers,+electronic+commerce+and+agile+methods%22&source=bl&ots=1kDBkhzlAH&sig=zK2lS-IRySSxahoqwMsSzJW-lUg&hl=en&ei=aYe6SsDzKcagjAfos8j6BQ&sa=X&oi=book_result&ct=result&resnum=3#v=onepage&q=%22History%20of%20computers%2C%20electronic%20commerce%20and%20agile%20methods%22&f=false . The second row apportions the programming languages into generations, but perhaps I read too much into it while looking for a reference more modern than the 1980's. But still, I still think that a more neutral point-of-view is needed on the PL page if generations differ on terminology. Given how many of us "old-timers" are still around, I suspect other references can be found.CSProfBill (talk) 20:53, 23 September 2009 (UTC)
I think you're misreading the diagram. The generations in it refer only to computers. Otherwise we'd have 3rd and 4th generation operating systems, but no 1st and 2nd etc. There's no mention of programing language generations on page 6. Pcap ping 21:01, 23 September 2009 (UTC)
Plus, the factual accuracy of that paper is a little doubtful. It says for instance that 2nd generation computers, like IBM 7090, did not have an operating system, but IBSYS is considered one, albeit very primitive (not a time-sharing system, tape-based etc.) IBM 7090 could also run BESYS, which was a time-sharing system. Pcap ping 21:22, 23 September 2009 (UTC)
On the issue of rephrasing the paragraph to a more neutral viewpoint, I propose waiting a week or so to see whether other editors voice views (I'll keep an eye on the second-generation page as well because that's where discussion to merge them and to include the historical POV was also voiced before I started. Then I'm happy to propose a more neutral rephrasing - what's the best way to do that - put the text here in the talk which makes citations difficult or put it there on the page which makes subsequent changing easier? I would prefer to do the latter only because it's easier, but I'm happy to go either route. I will explain the rationale for the changed phrases here in the talk.
As side-chat, I remember IBSYS, which wasn't really primitive for its time. When I was at MIT then, the Comp. Center ran FMS (the Fortran Moitor System), which was far more primitive than IBSYS, but was a better basis for CTSS, which ranks with BESYS and ATLAS as the first time-sharing systems. My recollections run more along the lines of Ben Meadowcroft's (at http://www.benmeadowcroft.com/reports/corbato/) about the relative roles of CTSS and BESYS in the creation of MULTICS. BESYS went through evolution and the 1957 date I have occasionally seen is 2 years before the first IBM 7090 installation. (CTSS first ran on the IBM 709). But the real pivot for time-sharing was the introduction of disk storage, which I think was an IBM 353 for CTSS - managing swapping on tapes was no fun.CSProfBill (talk) 11:09, 24 September 2009 (UTC)

I doubt that my unsourced opinion means much here, but as an erstwhile expert in the field, the whole notion of grouping programming languages into "generations" is a lot of garbage from a technical point of view. I don't know of a single academic programming language expert who takes such "generational" classifications seriously. k.lee (talk) 05:54, 11 August 2010 (UTC)

reverting a bad revert

In this edit, someone reverted the work of another editor, claiming it was not correct. As far as I can tell, they were wrong about that. So I'm reverting their revert. Kragen Javier Sitaker (talk) 23:05, 12 December 2010 (UTC)

How does a programming language compare and contrast to a natural language

Humans must be able to agree on the behavior of a computer program. A programming language has no value unless a human can perform the steps of computation in their head. In order to write a program, a human must be able to conceptualize what the code does. True, code can be generated by machine, and in a way that obfuscates, but a human can still work through that code, performing each step themselves, to see what it does. Obfuscated code makes that more difficult, but that's not a fundamental point. A programming language still must be simple enough and precise enough for humans to agree on the behavior of a particular program.

So the question is how a programming language compares and contrasts to a natural language. When a human reads symbols of a program, they give behavior in their mind. So how does that differ from a natural language? Well, the real world, and the natural languages that describe it, is complex. Statements in natural languages have ambiguity and people often argue about whether those statements correspond to the world outside our heads. We are doing so on this very page. In contrast, a programming language defines an artificial world that is much simpler than the real world. So simple, in fact, that statements in a programming language have precise behavior that all people agree upon, and a machine can be constructed to carry out. That simplicity of the artificial world, which has state and things that change state, that simplicity is the essential difference between a natural language and a programming language.

It's an important concept, and should not be left out of the article. It's especially important for non-CS people, for example kids who are curious what a programming language is. This puts things into perspective for them, saying how a programming language is different from a language people use to talk about the real world.Seanhalle (talk) 09:39, 28 June 2013 (UTC)

This is about the new paragraph added to the lead section, I assume:
[Programming languages] are distinguished from natural languages by the fact that they define an artificial world that is simple enough to define precisely. In general, this enables a human to perform the actions indicated by the symbols of a program in their mind and arrive at the same resulting world-state as any other human, or machine, that performs the same actions. For well defined programming languages, the correct resulting world-state of an individual action can be proven formally.
I must confess that I am not happy with the exact wording of this section insofar as I think speaking about a precisely defined "artificial world" and about "world states" is somewhat misleading. It is true that specifications of programming languages quite often refer to abstract machines (abstractions of concrete hardware) to specify the semantics of programs encoded in the language, see operational semantics, and that especially imperative languages quite strongly suggest that programs be interpreted in terms of changing world states. At the same time, not every syntactically program is meaningful in the sense that e.g. the relevant language specification may deliberately leave certain aspects undefined. So, in that sense, the "artificial world" mentioned is not defined precisely, or at least not fully defined. But perhaps you would say that these languages are not well defined.
When reading a program written in a functional style I don't think in terms of changing world states at all. I agree with the general idea of what the paragraph says and with what you wrote above, namely that both humans and machines have to be able to interprete computer programs, and consistently so. I just think that we have to be careful not to mislead the reader into thinking that every programming language is imperative. But perhaps I am reading too much into that paragraph.
Tobias Bergemann (talk) 20:55, 24 June 2013 (UTC)

These days many programs are automatically generated by computers. Also there are language families that are not based on using state as a method of getting things done e.g., functional programming and declarative programming. Derek farn (talk) 11:12, 25 June 2013 (UTC)

How about the text in the next paragraph.. it was expanded to take into account the criticisms. The point about such a paragraph is that *non CS people* also read wikipedia. It is up to us to write something that gives them intuition about programming languages. Pedantic insistence on exact details is good, but in the body where there is space to use enough words to get all the details exact to the satisfaction of the few of us who argue over them. However, in the introduction, the sparsity of words requires statements that give the _intuition_ without the verbosity of exactness. That verbosity and careful wording is required by more advanced aspects and by exceptions to the rule (an example apropos here is the comment about machine generated code -- a human still must understand the meanings of statements in the programming language, even in the case of machine generation.. it's an exception and subtlety that masks the intuition that humans must be able to read and agree on what the elements of a programming language do). Such careful wording either precludes any statements at all in the introduction that touch on the concepts, or else require difficult to parse statements filled with caveats that hide the intuition.

Here's the proposed paragraph

A programming language does not describe things in the real world, as a natural language does. Instead, it defines an artificial world whose basic elements are things like integers and objects. A program then describes things in terms of those basic elements. A physical machine translates actions in that artificial world into actions in the real world. For example a desktop computer translates an integer into a pattern of light that a human's eyes perceive as a number. The translation provides the value for humans. The simplicity of the artificial world allows one to precisely specify the state of that world and actions within it. The precision and simplicity makes it possible for humans to agree on the state and behavior within that world, and a machine can be constructed that also agrees. Programming languages are useful because the real world and natural languages are too complex for such precision and agreement. (Just taking a look at the talk pages on wikipedia illustrates the difficulty in agreement!)Seanhalle (talk) 09:39, 28 June 2013 (UTC)

Let's work on something here first rather than adding a large chunk of stuff to the introduction of an important article.
Agreed, and please try to be constructive, as opposed to obstructionist, by actually writing things that would satisfy you. It is too easy, and gives too much power to simply say "no" and throw up road blocks that impede progress.Seanhalle (talk) 09:39, 28 June 2013 (UTC)
Some languages do describe things in the real world, so called domain specific languages can have a direct mapping to real world entities. More general purpose languages tend to be more abstract and require greater effort to map from the concepts they support to the model of the real world being handled. Isn't this kind of discussion more appropriate for a computer programming article? Derek farn (talk) 10:45, 26 June 2013 (UTC)
I hear what you're saying, but would state, rather, that the two languages simply use the same names, but those names refer to very different things. In the DSL, the name refers to an artificial entity that consists of integers, floating point numbers, and pointers. It is still up to the machine and people to translate from the integers, floating point numbers, and pointers into into something in the real world. The DSL and the natural language may use the same set of characters, but the DSL characters refer to a collection of artificial things, while the natural language characters refer to a real world thing.Seanhalle (talk) 09:39, 28 June 2013 (UTC)
The above text was changed by 82.139.115.35 (talk · contribs · WHOIS) (diff). I assume that this is the same wikipedian as the original author, Seanhalle (talk · contribs). Please have a look at Wikipedia:Talk page guidelines. It's really rude to change comments after others have replied to them. — Tobias Bergemann (talk) 13:11, 26 June 2013 (UTC)
My apologies, Tobias. I felt my wording was itself rude, and set a poor example, so wanted to tone it down, without changing the heart of the meaning. Seanhalle (talk) 09:39, 28 June 2013 (UTC)

I'm sure there must have been some comparisons between programming and natural languages published previously in the literate. In the interest of verifiability, neutrality, accuracy and not turning this article in something that looks like someone’s personal essay it would probably be best to do a literate review first and then base any such comparison on those results. —Ruud 16:16, 26 June 2013 (UTC)

Ruud, that sounds like a good idea. Some citations would be welcome.Seanhalle (talk) 09:39, 28 June 2013 (UTC)

Seanhalle, as Ruud has pointed out your various suggested additions read like someone’s personal essay, so the style needs to change. The material covers how a particular kind of language might be used, but there are lots of languages that are not used in that way; however there are lots of developers following the usage you describe and so it is significant enough to warrant being included in an article. Is the programming language article the best place for this kind of material? What about the article on computer programming, this ought to say something about how a language is used to get something done. Derek farn (talk) 11:23, 28 June 2013 (UTC)

Derek, the motivation is that my son looked at this page and still had no idea what a programming language was, even though he writes code in 3 different programming languages. There's something very wrong with that. The explanation in the paragraph I put up on the site opened his eyes and made the rest make sense. I can't escape the feeling that you have been so immersed in programming languages for so long, that you've lost the ability to see from an outsiders perspective. People come here, to this wiki page, in order to understand just what a programming language is. And they come from the perspective of understanding what a natural language is. What the page has now is technically correct, but lacks intuition that relates a programming language to a natural language. It lacks a way to put programming language into perspective for them, and to relate, compare, and contrast a programming language to something they know. Just because its not a way of thinking that you're used to doesn't mean it doesn't belong here, but rather more likely indicates that you have become unable to see things from the point of view of someone who doesn't yet know all of the things you know. That makes you a poor choice for deciding what is valuable to such outsiders.

If you're wondering about my background, you can read about my work on parallel programming languages at http://opensourceresearchinstitute.org It includes papers that cover theory of computation and theory of parallelism, focused on the basic structure and how that can be used to understand the interaction of language design, runtime system choices, and hardware.

I also teach a graduate course on the design of parallel programming languages, which includes a survey of current parallel languages, and analyzes them in terms of properties related to portability, productivity, and adoptability. You can draw your own conclusions about my qualifications on the subject of programming languages, and the ability to teach about them.Seanhalle (talk) 02:48, 29 June 2013 (UTC)

Sean, I understand the problem of articles not being easily digestible by casual readers, its something that I encounter surprisingly often when using Wikipedia. An article's introduction is of necessity brief and to the point; there is plenty of opportunity to expand on the issues in the subsequent sections.
While everybody can use a natural language fluently I doubt if many of them have any great understanding of human languages and their characteristics; a native tongue is just something people can use without having to think about how it works. Philosophers seem to have managed to get themselves into plenty of tangles discussing such things as structural linguistics (I am a fan of cognitive linguistics myself).
I think an article on how programming languages are used to solve problems would be great and that a summary of such an article would make a good additional subsection. to the programming language article. Derek farn (talk) 16:48, 29 June 2013 (UTC)

Programming paradigms are missing in the abstract

paradigm — Preceding unsigned comment added by 79.204.117.100 (talk) 16:01, 2 November 2013 (UTC)

Good point! Got the lead section slightly expanded, so it is now mentioned. -- Dsimic (talk) 21:52, 2 November 2013 (UTC)

Introduction for non-CS people

Hello, I'd like to add a section for younger people, like my son, and for non computer people. I think most of us who edit this page are CS or related people, and we have a hard time understanding what it's like for someone coming from outside this world.. they're not helped by fine points of interest to us, but rather need some gentle path laid out that moves from the natural world they know and guides them to see how programming languages relate to that world.

I thought it best to open a discussion here, first, and post a proposed starting point, to gain the benefit of input from you.

Here goes: proposed section title "Introduction to programming languages for non computer programmers"

What is a programming language?

In the real world, basic physics is the rules of how our universe works. It defines state, such as atoms and sub atomic particles. And it defines characteristics that these have, such as momentum and direction and energy. And it defines the rules for interactions, such as forces.

A programming language does the same thing, for an artificial, or "virtual" universe. It defines state, which are called variables, and defines characteristics of the state, such as "integer" or "floating point", and defines rules for interactions, such as "+" and "-", which are add and subtract. Most programming languages include a way to create new rules for interaction, which are called "functions" or "procedures".

The process of writing a program involves creating a model of some part of the real world inside the programming language's artificial universe. For example, a variable might represent a person, and a function is defined that represents the action of one person talking to another person. In the programming language, a kind of state called a "string" contains letters. In the program, the letters in a string are grouped into words, which represent what the speaker says. The function takes a string from one person-variable and puts it into the other person-variable, and this represents the first person saying the words in the string to the second person.

In practice these basic concepts are at the base of every programming language. They all have kinds of state and operations that modify state. Ultra simple programming languages, like so called "assembly language" only have one or two kinds of state, and a small number of fixed operations that can affect the state. Advanced programming languages allow the programmer to define new kinds of state as part of the program they write, and some even allow defining advanced "meta" operations, which treat program code as state and generate new program code!

A programming language is different from other kinds of language in that its primary purpose is to construct models within the language-defined universe, and then have a machine, such as a CPU, set those models in motion. Sometimes the desire is for that model to interact with the real world, such as the programs inside microcontrollers used in cars to control the brakes and the engine. Other times the desire is for the model to go as far as it can and come to a stop, then the person using it looks at the final state the model arrived at. This final state is the answer the person wanted to compute.

The key distinguishing feature of a programming language is the ability to set the model in motion and that the motion is animated by a machine, which modifies the state according to the language's rules. Other languages, such as human "natural" languages, have words that represent state, and words that represent modifications of the state, but the only way to set these models in motion is for a human to perform the actions of modifying the state. There does not yet exist a way for a CPU or other machine to directly animate a model specified in terms of a natural language.

In fact, a human programmer performs the task of translating a model stated in terms of natural language into a model stated in terms of a programming language. The program is correct if, when the program model is set in motion, it is observed to behave the way the natural language model would. The natural language model is called a "specification" while the program model is said to "implement the specification". This means the program model is observed to behave the way the natural language model says to behave.

Of special note are languages used by computer programmers and others to create descriptions and non-machinge-animatable models. For example, languages such as XML are used for describing data, but have no operations that modify the data. In addition, UML is a popular language for specifying the structure of computer programs and the behavior expected from them. It is used during the process of creating program code. Although a model can be stated in terms of UML, these models normally can't be directly animated by a CPU. They are rather used to help programmers understand how the models they create in program code should behave and how they should communicate with other models created in code.

Kshalle (talk) 21:22, 1 February 2014 (UTC)

  • Hello there! Well-written and looking good to me; that would be a perfect fit for the "Overview" section in this article. The only thing you still need is one or two references backing the content; I know, it's all good, but—as we know—Wikipedia is all about providing reliable references. — Dsimic (talk | contribs) 02:09, 2 February 2014 (UTC)