Talk:Programming language/Archive 7

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 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?

About "out of place and inaccurate"...

Lead section proxy

Programming Language

Abstractions

Important ideas in the lead paragraph

Human communication?

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

Syn tags

The bottom line: synonymy question

What kind of language is a programming language?

Understandable by humans

Perl "proofs"

Automated archiving?

Recent change to generations

reverting a bad revert

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

Programming paradigms are missing in the abstract

Introduction for non-CS people

Related Articles

Wikiwand AI