Talk:Programming language

From Wikipedia, the free encyclopedia
Jump to: navigation, search
Former good article Programming language was one of the Engineering and technology good articles, but it has been removed from the list. There are suggestions below for improving the article to meet the good article criteria. Once these issues have been addressed, the article can be renominated. Editors may also seek a reassessment of the decision if they believe there was a mistake.
          This article is of interest to the following WikiProjects:
WikiProject Computing (Rated C-class, High-importance)
WikiProject icon This article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
C-Class article C  This article has been rated as C-Class on the project's quality scale.
 High  This article has been rated as High-importance on the project's importance scale.
 
WikiProject Computer science (Rated C-class, Top-importance)
WikiProject icon This article is within the scope of WikiProject Computer science, a collaborative effort to improve the coverage of Computer science related articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
C-Class article C  This article has been rated as C-Class on the project's quality scale.
 Top  This article has been rated as Top-importance on the project's importance scale.
 
Wikipedia Version 1.0 Editorial Team / v0.5
WikiProject icon This article has been reviewed by the Version 1.0 Editorial Team.
Taskforce icon
This article has been selected for Version 0.5 and subsequent release versions of Wikipedia.
 
C-Class article C  This article has been rated as C-Class on the quality scale.
This article has an assessment summary page.
edit·history·watch·refresh Stock post message.svg To-do list for Programming language:

To-do list is empty: remove {{to do}} tag or click on edit to add an item.

Human communication?[edit]

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)

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

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[edit]

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[edit]

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[edit]

Syn tags[edit]

(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[edit]

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 [1]. 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[edit]

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[edit]

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[edit]

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?[edit]

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[edit]

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[edit]

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"[edit]

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?[edit]

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[edit]

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[edit]

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[edit]

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)

Caption of java program[edit]

The caption states: [..] which will print the message "Hello World!" to the standard output when it is compiled and executed.

I'm sure we all know that is statement is not quite true, although Java is compiled to bytecode, it's still only readable to the JVM. I think we could clarify this point; perhaps adding 'executed by the JVM'.

Suggests on how to clarify the above statement would be great.

The statement also isn't true in the sense that this code alone will not actually print the message to stdout when it is run, since it lacks a main method. In fact, it won't even compile without main(). Not sure if the caption alone should be changed, or if the article needs a better (functioning) example. — Preceding unsigned comment added by 24.61.84.253 (talk) 17:03, 7 July 2014 (UTC)

Programming paradigms are missing in the abstract[edit]

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[edit]

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)