15
Programming language Source code of a simple computer program written in the C pro- gramming language, which will output the "Hello, world!" mes- sage when compiled and run A programming language is a formal computer lan- guage or constructed language designed to communi- cate instructions to a machine, particularly a computer. Programming languages can be used to create programs to control the behavior of a machine or to express algorithms. The earliest known programmable machine preceded the invention of the digital computer and is the automatic flute player described in the 9th century by the brothers Musa in Baghdad, “during the Islamic Golden Age". [1] From the early 1800s, “programs” were used to direct the behavior of machines such as Jacquard looms and player pianos. [2] Thousands of different programming languages have been created, mainly in the computer field, and many more still are being created every year. Many pro- gramming languages require computation to be specified in an imperative form (i.e., as a sequence of operations to perform), while other languages use other forms of pro- gram specification such as the declarative form (i.e. the desired result is specified, not how to achieve it). 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) have a dominant implementation that is treated as a reference. Some languages have both, with the basic language defined by a standard and ex- tensions taken from the dominant implementation being common. 1 Definitions A programming language is a notation for writing programs, which are specifications of a computation or algorithm. [3] Some, but not all, authors restrict the term “programming language” to those languages that can ex- press all possible algorithms. [3][4] Traits often considered important for what constitutes a programming language include: Function and target A computer programming lan- guage is a language used to write computer pro- grams, which involve a computer performing some kind of computation [5] or algorithm and possibly control external devices such as printers, disk drives, robots, [6] and so on. For example, PostScript pro- grams are frequently created by another program to control a computer printer or display. More generally, a programming language may describe computation on some, possibly abstract, machine. It is generally accepted that a complete specifica- tion for a programming language includes a descrip- tion, possibly idealized, of a machine or processor for that language. [7] In most practical contexts, a programming language involves a computer; conse- quently, programming languages are usually defined and studied this way. [8] Programming languages dif- fer from natural languages in that natural languages are only used for interaction between people, while programming languages also allow humans to com- municate instructions to machines. Abstractions Programming languages usually contain abstractions for defining and manipulating data structures or controlling the flow of execution. The practical necessity that a programming language support adequate abstractions is expressed by the abstraction principle; [9] this principle is sometimes formulated as a recommendation to the programmer to make proper use of such abstractions. [10] Expressive power The theory of computation classifies languages by the computations they are capable of expressing. All Turing complete languages can im- plement the same set of algorithms. ANSI/ISO SQL-92 and Charity are examples of languages that are not Turing complete, yet often called program- ming languages. [11][12] Markup languages like XML, HTML or troff, which de- fine structured data, are not usually considered program- 1

Programminglanguage · Programminglanguage SourcecodeofasimplecomputerprogramwrittenintheCpro-gramminglanguage,whichwilloutputthe"Hello,world!"mes-sagewhencompiledandrun

  • Upload
    others

  • View
    3

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Programminglanguage · Programminglanguage SourcecodeofasimplecomputerprogramwrittenintheCpro-gramminglanguage,whichwilloutputthe"Hello,world!"mes-sagewhencompiledandrun

Programming language

Source code of a simple computer program written in the C pro-gramming language, which will output the "Hello, world!" mes-sage when compiled and run

A programming language is a formal computer lan-guage or constructed language designed to communi-cate instructions to a machine, particularly a computer.Programming languages can be used to create programsto control the behavior of a machine or to expressalgorithms.The earliest known programmable machine preceded theinvention of the digital computer and is the automaticflute player described in the 9th century by the brothersMusa in Baghdad, “during the Islamic Golden Age".[1]From the early 1800s, “programs” were used to direct thebehavior of machines such as Jacquard looms and playerpianos.[2] Thousands of different programming languageshave been created, mainly in the computer field, andmany more still are being created every year. Many pro-gramming languages require computation to be specifiedin an imperative form (i.e., as a sequence of operations toperform), while other languages use other forms of pro-gram specification such as the declarative form (i.e. thedesired result is specified, not how to achieve it).The description of a programming language is usuallysplit into the two components of syntax (form) andsemantics (meaning). Some languages are defined by aspecification document (for example, the C programminglanguage is specified by an ISO Standard), while otherlanguages (such as Perl) have a dominant implementationthat is treated as a reference. Some languages have both,with the basic language defined by a standard and ex-tensions taken from the dominant implementation beingcommon.

1 Definitions

A programming language is a notation for writingprograms, which are specifications of a computation oralgorithm.[3] Some, but not all, authors restrict the term“programming language” to those languages that can ex-press all possible algorithms.[3][4] Traits often consideredimportant for what constitutes a programming languageinclude:

Function and target A computer programming lan-guage is a language used to write computer pro-grams, which involve a computer performing somekind of computation[5] or algorithm and possiblycontrol external devices such as printers, disk drives,robots,[6] and so on. For example, PostScript pro-grams are frequently created by another programto control a computer printer or display. Moregenerally, a programming language may describecomputation on some, possibly abstract, machine.It is generally accepted that a complete specifica-tion for a programming language includes a descrip-tion, possibly idealized, of a machine or processorfor that language.[7] In most practical contexts, aprogramming language involves a computer; conse-quently, programming languages are usually definedand studied this way.[8] Programming languages dif-fer from natural languages in that natural languagesare only used for interaction between people, whileprogramming languages also allow humans to com-municate instructions to machines.

Abstractions Programming languages usually containabstractions for defining and manipulating datastructures or controlling the flow of execution. Thepractical necessity that a programming languagesupport adequate abstractions is expressed by theabstraction principle;[9] this principle is sometimesformulated as a recommendation to the programmerto make proper use of such abstractions.[10]

Expressive power The theory of computation classifieslanguages by the computations they are capable ofexpressing. All Turing complete languages can im-plement the same set of algorithms. ANSI/ISOSQL-92 and Charity are examples of languages thatare not Turing complete, yet often called program-ming languages.[11][12]

Markup languages like XML, HTML or troff, which de-fine structured data, are not usually considered program-

1

Page 2: Programminglanguage · Programminglanguage SourcecodeofasimplecomputerprogramwrittenintheCpro-gramminglanguage,whichwilloutputthe"Hello,world!"mes-sagewhencompiledandrun

2 2 HISTORY

ming languages.[13][14][15] Programming languages may,however, share the syntax with markup languages if acomputational semantics is defined. XSLT, for example,is a Turing complete XML dialect.[16][17][18] Moreover,LaTeX, which is mostly used for structuring documents,also contains a Turing complete subset.[19][20]

The term computer language is sometimes used inter-changeably with programming language.[21] However,the usage of both terms varies among authors, includingthe exact scope of each. One usage describes program-ming languages as a subset of computer languages.[22]In this vein, languages used in computing that have adifferent goal than expressing computer programs aregenerically designated computer languages. For instance,markup languages are sometimes referred to as computerlanguages to emphasize that they are not meant to be usedfor programming.[23]

Another usage regards programming languages as the-oretical constructs for programming abstract machines,and computer languages as the subset thereof that runson physical computers, which have finite hardwareresources.[24] John C. Reynolds emphasizes that formalspecification languages are just as much programminglanguages as are the languages intended for execution. Healso argues that textual and even graphical input formatsthat affect the behavior of a computer are programminglanguages, despite the fact they are commonly not Turing-complete, and remarks that ignorance of programminglanguage concepts is the reason for many flaws in inputformats.[25]

2 History

Main article: History of programming languages

2.1 Early developments

The earliest computers were often programmed withoutthe help of a programming language, by writing programsin absolute machine language. The programs, in deci-mal or binary form, were read in from punched cards ormagnetic tape, or toggled in on switches on the front panelof the computer. Absolute machine languages were latertermed first-generation programming languages (1GL).The next step was development of so-called second-generation programming languages (2GL) or assemblylanguages, which were still closely tied to the instructionset architecture of the specific computer. These served tomake the program much more human-readable, and re-lieved the programmer of tedious and error-prone addresscalculations.The first high-level programming languages, or third-generation programming languages (3GL), were written

in the 1950s. An early high-level programming languageto be designed for a computer was Plankalkül, developedfor the German Z3 by Konrad Zuse between 1943 and1945. However, it was not implemented until 1998 and2000.[26]

John Mauchly's Short Code, proposed in 1949, wasone of the first high-level languages ever developed foran electronic computer.[27] Unlike machine code, ShortCode statements represented mathematical expressionsin understandable form. However, the program had tobe translated into machine code every time it ran, mak-ing the process much slower than running the equivalentmachine code.

The Manchester Mark 1 ran programs written in Autocode from1952.

At the University of Manchester, Alick Glennie devel-oped Autocode in the early 1950s. A programming lan-guage, it used a compiler to automatically convert the lan-guage into machine code. The first code and compilerwas developed in 1952 for the Mark 1 computer at theUniversity of Manchester and is considered to be the firstcompiled high-level programming language.[28][29]

The second autocode was developed for the Mark 1 byR. A. Brooker in 1954 and was called the “Mark 1 Au-tocode”. Brooker also developed an autocode for theFerranti Mercury in the 1950s in conjunction with theUniversity of Manchester. The version for the EDSAC 2was devised by D. F. Hartley of University of CambridgeMathematical Laboratory in 1961. Known as EDSAC2 Autocode, it was a straight development from MercuryAutocode adapted for local circumstances, and was notedfor its object code optimisation and source-language di-agnostics which were advanced for the time. A contem-porary but separate thread of development, Atlas Au-tocode was developed for the University of ManchesterAtlas 1 machine.In 1954, language FORTRAN was invented at IBM byJohn Backus; it was the first widely used high level generalpurpose programming language to have a functional im-plementation, as opposed to just a design on paper.[30][31]It is still popular language for high-performance comput-

Page 3: Programminglanguage · Programminglanguage SourcecodeofasimplecomputerprogramwrittenintheCpro-gramminglanguage,whichwilloutputthe"Hello,world!"mes-sagewhencompiledandrun

2.3 Consolidation and growth 3

ing[32] and is used for programs that benchmark and rankthe world’s fastest supercomputers.[33]

Another early programming language was devised byGrace Hopper in the US, called FLOW-MATIC. It wasdeveloped for the UNIVAC I at Remington Rand duringthe period from 1955 until 1959. Hopper found that busi-ness data processing customers were uncomfortable withmathematical notation, and in early 1955, she and herteam wrote a specification for an English programminglanguage and implemented a prototype.[34] The FLOW-MATIC compiler became publicly available in early 1958and was substantially complete in 1959.[35] Flow-Maticwas a major influence in the design of COBOL, since onlyit and its direct descendant AIMACO were in actual useat the time.[36]

2.2 Refinement

The increased use of high-level languages introduceda requirement for low-level programming languages orsystem programming languages. These languages, tovarying degrees, provide facilities between assembly lan-guages and high-level languages, and can be used to per-form tasks which require direct access to hardware facil-ities but still provide higher-level control structures anderror-checking.The period from the 1960s to the late 1970s brought thedevelopment of themajor language paradigms now in use:

• APL introduced array programming and influencedfunctional programming.[37]

• ALGOL refined both structured procedural pro-gramming and the discipline of language specifica-tion; the “Revised Report on the Algorithmic Lan-guage ALGOL 60" became a model for how laterlanguage specifications were written.

• Lisp, implemented in 1958, was the first dynami-cally typed functional programming language

• In the 1960s, Simula was the first language designedto support object-oriented programming; in the mid-1970s, Smalltalk followed with the first “purely”object-oriented language.

• C was developed between 1969 and 1973 as a sys-tem programming language for the Unix operatingsystem, and remains popular.[38]

• Prolog, designed in 1972, was the first logic pro-gramming language.

• In 1978, ML built a polymorphic type system on topof Lisp, pioneering statically typed functional pro-gramming languages.

Each of these languages spawned descendants, and mostmodern programming languages count at least one ofthem in their ancestry.The 1960s and 1970s also saw considerable debate overthe merits of structured programming, and whether pro-gramming languages should be designed to support it.[39]Edsger Dijkstra, in a famous 1968 letter published in theCommunications of the ACM, argued that GOTO state-ments should be eliminated from all “higher level” pro-gramming languages.[40]

2.3 Consolidation and growth

A selection of textbooks that teach programming, in languagesboth popular and obscure. These are only a few of the thousandsof programming languages and dialects that have been designedin history.

The 1980s were years of relative consolidation. C++combined object-oriented and systems programming.The United States government standardized Ada, a sys-tems programming language derived from Pascal and in-tended for use by defense contractors. In Japan and else-where, vast sums were spent investigating so-called “fifthgeneration” languages that incorporated logic program-ming constructs.[41] The functional languages communitymoved to standardize ML and Lisp. Rather than invent-ing new paradigms, all of these movements elaboratedupon the ideas invented in the previous decades.One important trend in language design for programminglarge-scale systems during the 1980s was an increased fo-cus on the use of modules, or large-scale organizational

Page 4: Programminglanguage · Programminglanguage SourcecodeofasimplecomputerprogramwrittenintheCpro-gramminglanguage,whichwilloutputthe"Hello,world!"mes-sagewhencompiledandrun

4 3 ELEMENTS

units of code. Modula-2, Ada, and ML all developednotable module systems in the 1980s, which were oftenwedded to generic programming constructs.[42]

The rapid growth of the Internet in the mid-1990s createdopportunities for new languages. Perl, originally a Unixscripting tool first released in 1987, became common indynamic websites. Java came to be used for server-sideprogramming, and bytecode virtual machines becamepopular again in commercial settings with their promiseof "Write once, run anywhere" (UCSD Pascal had beenpopular for a time in the early 1980s). These develop-ments were not fundamentally novel, rather they were re-finements of many existing languages and paradigms (al-though their syntax was often based on the C family ofprogramming languages).Programming language evolution continues, in both in-dustry and research. Current directions include secu-rity and reliability verification, new kinds of modular-ity (mixins, delegates, aspects), and database integrationsuch as Microsoft’s LINQ.Fourth-generation programming languages (4GL) are acomputer programming languages which aim to provide ahigher level of abstraction of the internal computer hard-ware details than 3GLs. Fifth generation programminglanguages (5GL) are programming languages based onsolving problems using constraints given to the program,rather than using an algorithm written by a programmer.

3 Elements

All programming languages have some primitive build-ing blocks for the description of data and the processesor transformations applied to them (like the addition oftwo numbers or the selection of an item from a collec-tion). These primitives are defined by syntactic and se-mantic rules which describe their structure and meaningrespectively.

3.1 Syntax

Main article: Syntax (programming languages)A programming language’s surface form is known as itssyntax. Most programming languages are purely textual;they use sequences of text including words, numbers, andpunctuation, much like written natural languages. On theother hand, there are some programming languages whichare more graphical in nature, using visual relationshipsbetween symbols to specify a program.The syntax of a language describes the possible combi-nations of symbols that form a syntactically correct pro-gram. The meaning given to a combination of symbolsis handled by semantics (either formal or hard-coded ina reference implementation). Since most languages aretextual, this article discusses textual syntax.

Parse tree of Python code with inset tokenization

def add5(x):return x+5

def dotwrite(ast):nodename = getNodename()label=symbol.sym_name.get(int(ast[0]),ast[0])print ' %s [label="%s' % (nodename, label),if isinstance(ast[1], str):

if ast[1].strip():print '= %s"];' % ast[1]

else:print '"]'

else:print '"];'children = []for n, child in enumerate(ast[1:]):

children.append(dotwrite(child))print ' %s -> {' % nodename,for name in children:

print '%s' % name,

Syntax highlighting is often used to aid programmers in recogniz-ing elements of source code. The language above is Python.

Programming language syntax is usually defined using acombination of regular expressions (for lexical structure)and Backus–Naur Form (for grammatical structure). Be-low is a simple grammar, based on Lisp:expression ::= atom | list atom ::= number | symbolnumber ::= [+-]?['0'-'9']+ symbol ::= ['A'-'Z''a'-'z'].* list::= '(' expression* ')'

This grammar specifies the following:

• an expression is either an atom or a list;

• an atom is either a number or a symbol;

• a number is an unbroken sequence of one or moredecimal digits, optionally preceded by a plus or mi-nus sign;

• a symbol is a letter followed by zero or more of anycharacters (excluding whitespace); and

• a list is a matched pair of parentheses, with zero ormore expressions inside it.

The following are examples of well-formed token se-quences in this grammar: 12345, () and (a b c232 (1)).

Page 5: Programminglanguage · Programminglanguage SourcecodeofasimplecomputerprogramwrittenintheCpro-gramminglanguage,whichwilloutputthe"Hello,world!"mes-sagewhencompiledandrun

3.3 Type system 5

Not all syntactically correct programs are semanti-cally correct. Many syntactically correct programs arenonetheless ill-formed, per the language’s rules; and may(depending on the language specification and the sound-ness of the implementation) result in an error on trans-lation or execution. In some cases, such programs mayexhibit undefined behavior. Even when a program is well-defined within a language, it may still have a meaning thatis not intended by the person who wrote it.Using natural language as an example, it may not be pos-sible to assign a meaning to a grammatically correct sen-tence or the sentence may be false:

• "Colorless green ideas sleep furiously.” is grammat-ically well-formed but has no generally acceptedmeaning.

• “John is a married bachelor.” is grammatically well-formed but expresses a meaning that cannot be true.

The following C language fragment is syntactically cor-rect, but performs operations that are not semanticallydefined (the operation *p >> 4 has no meaning for a valuehaving a complex type and p->im is not defined becausethe value of p is the null pointer):complex *p = NULL; complex abs_p = sqrt(*p >> 4 +p->im);

If the type declaration on the first line were omitted, theprogram would trigger an error on compilation, as thevariable “p” would not be defined. But the programwouldstill be syntactically correct, since type declarations pro-vide only semantic information.The grammar needed to specify a programming languagecan be classified by its position in the Chomsky hierarchy.The syntax of most programming languages can be spec-ified using a Type-2 grammar, i.e., they are context-freegrammars.[43] Some languages, including Perl and Lisp,contain constructs that allow execution during the pars-ing phase. Languages that have constructs that allow theprogrammer to alter the behavior of the parser make syn-tax analysis an undecidable problem, and generally blurthe distinction between parsing and execution.[44] In con-trast to Lisp’s macro system and Perl’s BEGIN blocks,which may contain general computations, C macros aremerely string replacements, and do not require codeexecution.[45]

3.2 Semantics

The term Semantics refers to the meaning of languages,as opposed to their form (syntax).

3.2.1 Static semantics

The static semantics defines restrictions on the struc-ture of valid texts that are hard or impossible to ex-press in standard syntactic formalisms.[3] For compiledlanguages, static semantics essentially include those se-mantic rules that can be checked at compile time. Ex-amples include checking that every identifier is declaredbefore it is used (in languages that require such declara-tions) or that the labels on the arms of a case statementare distinct.[46] Many important restrictions of this type,like checking that identifiers are used in the appropriatecontext (e.g. not adding an integer to a function name),or that subroutine calls have the appropriate number andtype of arguments, can be enforced by defining them asrules in a logic called a type system. Other forms of staticanalyses like data flow analysis may also be part of staticsemantics. Newer programming languages like Java andC# have definite assignment analysis, a form of data flowanalysis, as part of their static semantics.

3.2.2 Dynamic semantics

Main article: Semantics of programming languages

Once data has been specified, the machine must be in-structed to perform operations on the data. For exam-ple, the semantics may define the strategy by which ex-pressions are evaluated to values, or the manner in whichcontrol structures conditionally execute statements. Thedynamic semantics (also known as execution semantics) ofa language defines how and when the various constructsof a language should produce a program behavior. Thereare many ways of defining execution semantics. Naturallanguage is often used to specify the execution semanticsof languages commonly used in practice. A significantamount of academic research went into formal seman-tics of programming languages, which allow execution se-mantics to be specified in a formal manner. Results fromthis field of research have seen limited application to pro-gramming language design and implementation outsideacademia.

3.3 Type system

Main articles: Data type, Type system, and Type safety

A type system defines how a programming language clas-sifies values and expressions into types, how it can ma-nipulate those types and how they interact. The goal ofa type system is to verify and usually enforce a certainlevel of correctness in programs written in that languageby detecting certain incorrect operations. Any decidabletype system involves a trade-off: while it rejects manyincorrect programs, it can also prohibit some correct, al-beit unusual programs. In order to bypass this down-

Page 6: Programminglanguage · Programminglanguage SourcecodeofasimplecomputerprogramwrittenintheCpro-gramminglanguage,whichwilloutputthe"Hello,world!"mes-sagewhencompiledandrun

6 3 ELEMENTS

side, a number of languages have type loopholes, usuallyunchecked casts that may be used by the programmer toexplicitly allow a normally disallowed operation betweendifferent types. In most typed languages, the type systemis used only to type check programs, but a number oflanguages, usually functional ones, infer types, relievingthe programmer from the need to write type annotations.The formal design and study of type systems is known astype theory.

3.3.1 Typed versus untyped languages

A language is typed if the specification of every operationdefines types of data to which the operation is applica-ble, with the implication that it is not applicable to othertypes.[47] For example, the data represented by “this textbetween the quotes” is a string, and inmany programminglanguages dividing a number by a string has no meaningand will be rejected by the compilers. The invalid op-eration may be detected when the program is compiled(“static” type checking) and will be rejected by the com-piler with a compilation error message, or it may be de-tected when the program is run (“dynamic” type check-ing), resulting in a run-time exception. Many languagesallow a function called an exception handler to be writtento handle this exception and, for example, always return"−1” as the result.A special case of typed languages are the single-type lan-guages. These are often scripting or markup languages,such as REXX or SGML, and have only one data type—most commonly character strings which are used for bothsymbolic and numeric data.In contrast, an untyped language, such as most assemblylanguages, allows any operation to be performed on anydata, which are generally considered to be sequences ofbits of various lengths.[47] High-level languages which areuntyped include BCPL, Tcl, and some varieties of Forth.In practice, while few languages are considered typedfrom the point of view of type theory (verifying or re-jecting all operations), most modern languages offer adegree of typing.[47] Many production languages providemeans to bypass or subvert the type system, trading type-safety for finer control over the program’s execution (seecasting).

3.3.2 Static versus dynamic typing

In static typing, all expressions have their types deter-mined prior to when the program is executed, typicallyat compile-time. For example, 1 and (2+2) are integerexpressions; they cannot be passed to a function that ex-pects a string, or stored in a variable that is defined to holddates.[47]

Statically typed languages can be either manifestly typedor type-inferred. In the first case, the programmer must

explicitly write types at certain textual positions (for ex-ample, at variable declarations). In the second case, thecompiler infers the types of expressions and declarationsbased on context. Most mainstream statically typed lan-guages, such as C++, C# and Java, are manifestly typed.Complete type inference has traditionally been associatedwith less mainstream languages, such as Haskell and ML.However, many manifestly typed languages support par-tial type inference; for example, Java and C# both infertypes in certain limited cases.[48] Additionally, some pro-gramming languages allow for some types to be automat-ically converted to other types; for example, an int can beused where the program expects a float.Dynamic typing, also called latent typing, determines thetype-safety of operations at run time; in other words,types are associated with run-time values rather than tex-tual expressions.[47] As with type-inferred languages, dy-namically typed languages do not require the programmerto write explicit type annotations on expressions. Amongother things, this may permit a single variable to refer tovalues of different types at different points in the pro-gram execution. However, type errors cannot be auto-matically detected until a piece of code is actually exe-cuted, potentially making debugging more difficult. Lisp,Smalltalk, Perl, Python, JavaScript, and Ruby are dynam-ically typed.

3.3.3 Weak and strong typing

Weak typing allows a value of one type to be treated asanother, for example treating a string as a number.[47]This can occasionally be useful, but it can also allow somekinds of program faults to go undetected at compile timeand even at run time.Strong typing prevents the above. An attempt to performan operation on the wrong type of value raises an error.[47]Strongly typed languages are often termed type-safe orsafe.An alternative definition for “weakly typed” refers to lan-guages, such as Perl and JavaScript, which permit a largenumber of implicit type conversions. In JavaScript, forexample, the expression 2 * x implicitly converts x to anumber, and this conversion succeeds even if x is null,undefined, an Array, or a string of letters. Such implicitconversions are often useful, but they can mask program-ming errors. Strong and static are now generally consid-ered orthogonal concepts, but usage in the literature dif-fers. Some use the term strongly typed to mean strongly,statically typed, or, even more confusingly, to mean sim-ply statically typed. Thus C has been called both stronglytyped and weakly, statically typed.[49][50]

It may seem odd to some professional programmers thatC could be “weakly, statically typed”. However, noticethat the use of the generic pointer, the void* pointer,does allow for casting of pointers to other pointers with-out needing to do an explicit cast. This is extremely sim-

Page 7: Programminglanguage · Programminglanguage SourcecodeofasimplecomputerprogramwrittenintheCpro-gramminglanguage,whichwilloutputthe"Hello,world!"mes-sagewhencompiledandrun

4.1 Specification 7

ilar to somehow casting an array of bytes to any kind ofdatatype in C without using an explicit cast, such as (int)or (char).

3.4 Standard library and run-time system

Main article: Standard library

Most programming languages have an associated corelibrary (sometimes known as the 'standard library', es-pecially if it is included as part of the published languagestandard), which is conventionally made available by allimplementations of the language. Core libraries typicallyinclude definitions for commonly used algorithms, datastructures, and mechanisms for input and output.The line between a language and its core library differsfrom language to language. In some cases, the languagedesigners may treat the library as a separate entity fromthe language. However, a language’s core library is oftentreated as part of the language by its users, and some lan-guage specifications even require that this library be madeavailable in all implementations. Indeed, some languagesare designed so that themeanings of certain syntactic con-structs cannot even be described without referring to thecore library. For example, in Java, a string literal is de-fined as an instance of the java.lang.String class; simi-larly, in Smalltalk, an anonymous function expression (a“block”) constructs an instance of the library’s BlockCon-text class. Conversely, Scheme contains multiple coher-ent subsets that suffice to construct the rest of the lan-guage as library macros, and so the language designersdo not even bother to say which portions of the languagemust be implemented as language constructs, and whichmust be implemented as parts of a library.

4 Design and implementation

Programming languages share properties with naturallanguages related to their purpose as vehicles for com-munication, having a syntactic form separate from its se-mantics, and showing language families of related lan-guages branching one from another.[51][52] But as artifi-cial constructs, they also differ in fundamental ways fromlanguages that have evolved through usage. A signifi-cant difference is that a programming language can befully described and studied in its entirety, since it has aprecise and finite definition.[53] By contrast, natural lan-guages have changing meanings given by their users indifferent communities. While constructed languages arealso artificial languages designed from the ground up witha specific purpose, they lack the precise and complete se-mantic definition that a programming language has.Many programming languages have been designed fromscratch, altered to meet new needs, and combined withother languages. Many have eventually fallen into disuse.

Although there have been attempts to design one “uni-versal” programming language that serves all purposes,all of them have failed to be generally accepted as fillingthis role.[54] The need for diverse programming languagesarises from the diversity of contexts in which languagesare used:

• Programs range from tiny scripts written by individ-ual hobbyists to huge systems written by hundreds ofprogrammers.

• Programmers range in expertise from novices whoneed simplicity above all else, to experts who maybe comfortable with considerable complexity.

• Programs must balance speed, size, and simplic-ity on systems ranging from microcontrollers tosupercomputers.

• Programs may be written once and not change forgenerations, or they may undergo continual modifi-cation.

• Programmers may simply differ in their tastes: theymay be accustomed to discussing problems and ex-pressing them in a particular language.

One common trend in the development of programminglanguages has been to add more ability to solve problemsusing a higher level of abstraction. The earliest program-ming languages were tied very closely to the underlyinghardware of the computer. As new programming lan-guages have developed, features have been added that letprogrammers express ideas that are more remote fromsimple translation into underlying hardware instructions.Because programmers are less tied to the complexity ofthe computer, their programs can do more computingwith less effort from the programmer. This lets themwrite more functionality per time unit.[55]

Natural language programming has been proposed as away to eliminate the need for a specialized language forprogramming. However, this goal remains distant and itsbenefits are open to debate. Edsger W. Dijkstra took theposition that the use of a formal language is essential toprevent the introduction of meaningless constructs, anddismissed natural language programming as “foolish”.[56]Alan Perlis was similarly dismissive of the idea.[57] Hy-brid approaches have been taken in Structured Englishand SQL.A language’s designers and users must construct a num-ber of artifacts that govern and enable the practice of pro-gramming. The most important of these artifacts are thelanguage specification and implementation.

4.1 Specification

Main article: Programming language specification

Page 8: Programminglanguage · Programminglanguage SourcecodeofasimplecomputerprogramwrittenintheCpro-gramminglanguage,whichwilloutputthe"Hello,world!"mes-sagewhencompiledandrun

8 6 USAGE

The specification of a programming language is an arti-fact that the language users and the implementors can useto agree upon whether a piece of source code is a validprogram in that language, and if so what its behavior shallbe.A programming language specification can take severalforms, including the following:

• An explicit definition of the syntax, static seman-tics, and execution semantics of the language. Whilesyntax is commonly specified using a formal gram-mar, semantic definitions may be written in naturallanguage (e.g., as in the C language), or a formal se-mantics (e.g., as in Standard ML[58] and Scheme[59]specifications).

• A description of the behavior of a translator for thelanguage (e.g., the C++ and Fortran specifications).The syntax and semantics of the language have to beinferred from this description, which may be writtenin natural or a formal language.

• A reference or model implementation, sometimeswritten in the language being specified (e.g., Prologor ANSI REXX[60]). The syntax and semantics ofthe language are explicit in the behavior of the ref-erence implementation.

4.2 Implementation

Main article: Programming language implementation

An implementation of a programming language providesa way to write programs in that language and executethem on one or more configurations of hardware andsoftware. There are, broadly, two approaches to pro-gramming language implementation: compilation andinterpretation. It is generally possible to implement a lan-guage using either technique.The output of a compiler may be executed by hardware ora program called an interpreter. In some implementationsthat make use of the interpreter approach there is no dis-tinct boundary between compiling and interpreting. Forinstance, some implementations of BASIC compile andthen execute the source a line at a time.Programs that are executed directly on the hardware usu-ally run several orders of magnitude faster than those thatare interpreted in software.One technique for improving the performance of in-terpreted programs is just-in-time compilation. Herethe virtual machine, just before execution, translates theblocks of bytecode which are going to be used to machinecode, for direct execution on the hardware.

5 Proprietary languages

Although most of the most commonly used programminglanguages have fully open specifications and implemen-tations, many programming languages exist only as pro-prietary programming languages with the implementa-tion available only from a single vendor, which may claimthat such a proprietary language is their intellectual prop-erty. Proprietary programming languages are commonlydomain specific languages or internal scripting languagesfor a single product; some proprietary languages are usedonly internally within a vendor, while others are availableto external users.Some programming languages exist on the border be-tween proprietary and open; for example, Oracle Corpo-ration asserts proprietary rights to some aspects of theJava programming language, and Microsoft's C# pro-gramming language, which has open implementations ofmost parts of the system, also has Common LanguageRuntime (CLR) as a closed environment.Many proprietary languages are widely used, in spite oftheir proprietary nature; examples include MATLAB andVBScript. Some languages may make the transition fromclosed to open; for example, Erlang was originally an Er-icsson’s internal programming language.

6 Usage

Thousands of different programming languages havebeen created, mainly in the computing field.[61] Soft-ware is commonly built with 5 programming languagesor more.[62]

Programming languages differ from most other forms ofhuman expression in that they require a greater degree ofprecision and completeness. When using a natural lan-guage to communicate with other people, human authorsand speakers can be ambiguous and make small errors,and still expect their intent to be understood. However,figuratively speaking, computers “do exactly what theyare told to do”, and cannot “understand” what code theprogrammer intended to write. The combination of thelanguage definition, a program, and the program’s inputsmust fully specify the external behavior that occurs whenthe program is executed, within the domain of controlof that program. On the other hand, ideas about an algo-rithm can be communicated to humans without the preci-sion required for execution by using pseudocode, whichinterleaves natural language with code written in a pro-gramming language.A programming language provides a structured mecha-nism for defining pieces of data, and the operations ortransformations that may be carried out automatically onthat data. A programmer uses the abstractions present inthe language to represent the concepts involved in a com-putation. These concepts are represented as a collection

Page 9: Programminglanguage · Programminglanguage SourcecodeofasimplecomputerprogramwrittenintheCpro-gramminglanguage,whichwilloutputthe"Hello,world!"mes-sagewhencompiledandrun

9

of the simplest elements available (called primitives).[63]Programming is the process by which programmers com-bine these primitives to compose new programs, or adaptexisting ones to new uses or a changing environment.Programs for a computer might be executed in a batchprocess without human interaction, or a user might typecommands in an interactive session of an interpreter. Inthis case the “commands” are simply programs, whoseexecution is chained together. When a language can runits commands through an interpreter (such as a Unix shellor other command-line interface), without compiling, itis called a scripting language.[64]

6.1 Measuring language usage

Main article: Measuring programming language popu-larity

It is difficult to determine which programming languagesare most widely used, and what usage means varies bycontext. One language may occupy the greater numberof programmer hours, a different one have more linesof code, and a third may consume the most CPU time.Some languages are very popular for particular kinds ofapplications. For example, COBOL is still strong in thecorporate data center, often on large mainframes;[65][66]Fortran in scientific and engineering applications; Ada inaerospace, transportation, military, real-time and embed-ded applications; and C in embedded applications and op-erating systems. Other languages are regularly used towrite many different kinds of applications.Various methods of measuring language popularity, eachsubject to a different bias over what is measured, havebeen proposed:

• counting the number of job advertisements thatmention the language[67]

• the number of books sold that teach or describe thelanguage[68]

• estimates of the number of existing lines of codewritten in the language – which may underestimatelanguages not often found in public searches[69]

• counts of language references (i.e., to the name ofthe language) found using a web search engine.

Combining and averaging information from various in-ternet sites, langpop.com claims that in 2013 the ten mostpopular programming languages are (in descending orderby overall popularity): C, Java, PHP, JavaScript, C++,Python, Shell, Ruby, Objective-C and C#.[70]

7 Taxonomies

For more details on this topic, see Categorical list ofprogramming languages.

There is no overarching classification scheme for pro-gramming languages. A given programming languagedoes not usually have a single ancestor language. Lan-guages commonly arise by combining the elements ofseveral predecessor languages with new ideas in circula-tion at the time. Ideas that originate in one language willdiffuse throughout a family of related languages, and thenleap suddenly across familial gaps to appear in an entirelydifferent family.The task is further complicated by the fact that languagescan be classified along multiple axes. For example, Javais both an object-oriented language (because it encour-ages object-oriented organization) and a concurrent lan-guage (because it contains built-in constructs for runningmultiple threads in parallel). Python is an object-orientedscripting language.In broad strokes, programming languages divide intoprogramming paradigms and a classification by intendeddomain of use, with general-purpose programming lan-guages distinguished from domain-specific programminglanguages. Traditionally, programming languages havebeen regarded as describing computation in terms of im-perative sentences, i.e. issuing commands. These aregenerally called imperative programming languages. Agreat deal of research in programming languages hasbeen aimed at blurring the distinction between a pro-gram as a set of instructions and a program as an asser-tion about the desired answer, which is the main featureof declarative programming.[71] More refined paradigmsinclude procedural programming, object-oriented pro-gramming, functional programming, and logic program-ming; some languages are hybrids of paradigms or multi-paradigmatic. An assembly language is not so much aparadigm as a direct model of an underlying machine ar-chitecture. By purpose, programming languages mightbe considered general purpose, system programming lan-guages, scripting languages, domain-specific languages,or concurrent/distributed languages (or a combination ofthese).[72] Some general purpose languages were designedlargely with educational goals.[73]

A programming language may also be classified by fac-tors unrelated to programming paradigm. For instance,most programming languages use English language key-words, while a minority do not. Other languages may beclassified as being deliberately esoteric or not.

8 See also

• Comparison of programming languages (basic in-structions)

Page 10: Programminglanguage · Programminglanguage SourcecodeofasimplecomputerprogramwrittenintheCpro-gramminglanguage,whichwilloutputthe"Hello,world!"mes-sagewhencompiledandrun

10 9 REFERENCES

• Comparison of programming languages

• Computer programming

• Computer science and Outline of computer science

• Educational programming language

• Invariant based programming

• Lists of programming languages

• List of programming language researchers

• Programming languages used in most popular web-sites

• Literate programming

• Dialect (computing)

• Programming language theory

• Pseudocode

• Scientific programming language

• Software engineering and List of software engineer-ing topics

9 References

[1] Koetsier, Teun (2001). On the prehistory of pro-grammable machines; musical automata, looms, calcula-tors. PERGAMON, Mechanisma and Machine Theory36. pp. 589–603.

[2] Ettinger, James (2004) Jacquard’s Web, Oxford Univer-sity Press

[3] Aaby, Anthony (2004). Introduction to ProgrammingLanguages.

[4] In mathematical terms, this means the programming lan-guage is Turing-complete MacLennan, Bruce J. (1987).Principles of Programming Languages. Oxford UniversityPress. p. 1. ISBN 0-19-511306-3.

[5] ACM SIGPLAN (2003). “Bylaws of the Special Inter-est Group on Programming Languages of the Associationfor Computing Machinery”. Retrieved 19 June 2006.,The scope of SIGPLAN is the theory, design, implemen-tation, description, and application of computer program-ming languages - languages that permit the specification ofa variety of different computations, thereby providing theuser with significant control (immediate or delayed) overthe computer’s operation.

[6] Dean, Tom (2002). “Programming Robots”. Building In-telligent Robots. Brown University Department of Com-puter Science. Retrieved 23 September 2006.

[7] R. Narasimahan, Programming Languages and Comput-ers: A Unified Metatheory, pp. 189-−247 in Franz Alt,Morris Rubinoff (eds.) Advances in computers, Volume8, Academic Press, 1994, ISBN 0-12-012108-5, p.193: “a complete specification of a programming languagemust, by definition, include a specification of a processor--idealized, if you will--for that language.” [the source citesmany references to support this statement]

[8] Ben Ari, Mordechai (1996). Understanding ProgrammingLanguages. John Wiley and Sons. Programs and lan-guages can be defined as purely formal mathematical ob-jects. However, more people are interested in programsthan in other mathematical objects such as groups, pre-cisely because it is possible to use the program—the se-quence of symbols—to control the execution of a com-puter. While we highly recommend the study of the the-ory of programming, this text will generally limit itself tothe study of programs as they are executed on a computer.

[9] David A. Schmidt, The structure of typed programminglanguages, MIT Press, 1994, ISBN 0-262-19349-3, p. 32

[10] Pierce, Benjamin (2002). Types and Programming Lan-guages. MIT Press. p. 339. ISBN 0-262-16209-1.

[11] Digital Equipment Corporation. “Information Technol-ogy - Database Language SQL (Proposed revised textof DIS 9075)". ISO/IEC 9075:1992, Database LanguageSQL. Retrieved 29 June 2006.

[12] The Charity Development Group (December 1996). “TheCHARITY Home Page”. Retrieved 29 June 2006., Char-ity is a categorical programming language..., All Charitycomputations terminate.

[13] XML in 10 pointsW3C, 1999, XML is not a programminglanguage.

[14] Powell, Thomas (2003). HTML & XHTML: the completereference. McGraw-Hill. p. 25. ISBN 0-07-222942-X.HTML is not a programming language.

[15] Dykes, Lucinda; Tittel, Ed (2005). XML For Dummies,4th Edition. Wiley. p. 20. ISBN 0-7645-8845-1. ...it’s amarkup language, not a programming language.

[16] “What kind of language is XSLT?". IBM.com. Retrieved3 December 2010.

[17] “XSLT is a Programming Language”.Msdn.microsoft.com. Retrieved 3 December 2010.

[18] Scott, Michael (2006). Programming Language Pragmat-ics. Morgan Kaufmann. p. 802. ISBN 0-12-633951-1.XSLT, though highly specialized to the transformation ofXML, is a Turing-complete programming language.

[19] http://tobi.oetiker.ch/lshort/lshort.pdf

[20] Syropoulos, Apostolos; Antonis Tsolomitis; Nick Sofro-niou (2003). Digital typography using LaTeX. Springer-Verlag. p. 213. ISBN 0-387-95217-9. TeX is not onlyan excellent typesetting engine but also a real programminglanguage.

[21] Robert A. Edmunds, The Prentice-Hall standard glossaryof computer terminology, Prentice-Hall, 1985, p. 91

Page 11: Programminglanguage · Programminglanguage SourcecodeofasimplecomputerprogramwrittenintheCpro-gramminglanguage,whichwilloutputthe"Hello,world!"mes-sagewhencompiledandrun

11

[22] Pascal Lando, Anne Lapujade, Gilles Kassel, and FrédéricFürst, Towards a General Ontology of Computer Pro-grams, ICSOFT 2007, pp. 163-170

[23] S.K. Bajpai, Introduction To Computers And C Program-ming, New Age International, 2007, ISBN 81-224-1379-X, p. 346

[24] R. Narasimahan, Programming Languages and Comput-ers: A Unified Metatheory, pp. 189-−247 in Franz Alt,Morris Rubinoff (eds.) Advances in computers, Volume8, Academic Press, 1994, ISBN 0-12-012108-5, p.215:"[...] the model [...] for computer languages differsfrom that [...] for programming languages in only tworespects. In a computer language, there are only finitelymany names--or registers--which can assume only finitelymany values--or states--and these states are not furtherdistinguished in terms of any other attributes. [author’sfootnote:] This may sound like a truism but its implica-tions are far reaching. For example, it would imply thatany model for programming languages, by fixing certainof its parameters or features, should be reducible in a nat-ural way to a model for computer languages.”

[25] John C. Reynolds, Some thoughts on teaching program-ming and programming languages, SIGPLAN Notices,Volume 43, Issue 11, November 2008, p.109

[26] Rojas, Raúl, et al. (2000). “Plankalkül: The First High-Level Programming Language and its Implementation”.Institut für Informatik, Freie Universität Berlin, TechnicalReport B-3/2000. (full text)

[27] Sebesta, W.S Concepts of Programming languages.2006;M6 14:18 pp.44. ISBN 0-321-33025-0

[28] Knuth, Donald E.; Pardo, Luis Trabb. “Early developmentof programming languages”. Encyclopedia of ComputerScience and Technology. Marcel Dekker. 7: 419–493.

[29] Peter J. Bentley (2012). Digitized: The Science of Com-puters and how it Shapes Our World. Oxford UniversityPress. p. 87.

[30] “Fortran creator John Backus dies - Tech and gadgets-msnbc.com”. MSNBC. 2007-03-20. Retrieved 2010-04-25.

[31] “CSC-302 99S : Class 02: A Brief History of Program-ming Languages”. Math.grin.edu. Retrieved 2010-04-25.

[32] Eugene Loh (18 June 2010). “The Ideal HPC Program-ming Language”. Queue. Association of Computing Ma-chines. 8 (6).

[33] “HPL - A Portable Implementation of the High-Performance Linpack Benchmark for Distributed-Memory Computers”. Retrieved 2015-02-21.

[34] Hopper (1978) p. 16.

[35] Sammet (1969) p. 316

[36] Sammet (1978) p. 204.

[37] Richard L. Wexelblat: History of Programming Lan-guages, Academic Press, 1981, chapter XIV.

[38] François Labelle. “Programming Language UsageGraph”. SourceForge. Retrieved 21 June 2006.. Thiscomparison analyzes trends in number of projects hostedby a popular community programming repository. Duringmost years of the comparison, C leads by a considerablemargin; in 2006, Java overtakes C, but the combination ofC/C++ still leads considerably.

[39] Hayes, Brian (2006). “The Semicolon Wars”. AmericanScientist. 94 (4): 299–303. doi:10.1511/2006.60.299.

[40] Dijkstra, Edsger W. (March 1968). “Go To State-ment Considered Harmful” (PDF). Communications ofthe ACM. 11 (3): 147–148. doi:10.1145/362929.362947.Retrieved 2014-05-22.

[41] Tetsuro Fujise, Takashi Chikayama, Kazuaki Roku-sawa, Akihiko Nakase (December 1994). “KLIC: APortable Implementation of KL1” Proc. of FGCS '94,ICOT Tokyo, December 1994. http://www.icot.or.jp/ARCHIVE/HomePage-E.html KLIC is a portable imple-mentation of a concurrent logic programming languageKL1.

[42] Jim Bender (15 March 2004). “Mini-Bibliography onModules for Functional Programming Languages”. Read-Scheme.org. Retrieved 27 September 2006.

[43] Michael Sipser (1996). Introduction to the Theory of Com-putation. PWS Publishing. ISBN 0-534-94728-X. Sec-tion 2.2: Pushdown Automata, pp.101–114.

[44] Jeffrey Kegler, "Perl and Undecidability", The Perl Re-view. Papers 2 and 3 prove, using respectively Rice’s the-orem and direct reduction to the halting problem, that theparsing of Perl programs is in general undecidable.

[45] Marty Hall, 1995, Lecture Notes: Macros, PostScriptversion

[46] Michael Lee Scott, Programming language pragmatics,Edition 2, Morgan Kaufmann, 2006, ISBN 0-12-633951-1, p. 18–19

[47] Andrew Cooke. “Introduction To Computer Languages”.Retrieved 13 July 2012.

[48] Specifically, instantiations of generic types are in-ferred for certain expression forms. Type inference inGeneric Java—the research language that provided thebasis for Java 1.5’s bounded parametric polymorphismextensions—is discussed in two informal manuscriptsfrom the Types mailing list: Generic Java type inferenceis unsound (Alan Jeffrey, 17 December 2001) and SoundGeneric Java type inference (Martin Odersky, 15 January2002). C#'s type system is similar to Java’s, and uses asimilar partial type inference scheme.

[49] “Revised Report on the Algorithmic Language Scheme”.20 February 1998. Retrieved 9 June 2006.

[50] Luca Cardelli and Peter Wegner. “On Understand-ing Types, Data Abstraction, and Polymorphism”.Manuscript (1985). Retrieved 9 June 2006.

[51] Steven R. Fischer, A history of language, Reaktion Books,2003, ISBN 1-86189-080-X, p. 205

Page 12: Programminglanguage · Programminglanguage SourcecodeofasimplecomputerprogramwrittenintheCpro-gramminglanguage,whichwilloutputthe"Hello,world!"mes-sagewhencompiledandrun

12 10 FURTHER READING

[52] Éric Lévénez (2011). “Computer Languages History”.

[53] Jing Huang. “Artificial Language vs. Natural Language”.

[54] IBM in first publishing PL/I, for example, rather ambi-tiously titled its manual The universal programming lan-guage PL/I (IBMLibrary; 1966). The title reflected IBM’sgoals for unlimited subsetting capability: PL/I is designedin such a way that one can isolate subsets from it satisfy-ing the requirements of particular applications. (“PL/I”.Encyclopedia of Mathematics. Retrieved 29 June 2006.).Ada and UNCOL had similar early goals.

[55] Frederick P. Brooks, Jr.: The Mythical Man-Month,Addison-Wesley, 1982, pp. 93-94

[56] Dijkstra, Edsger W. On the foolishness of “natural lan-guage programming.” EWD667.

[57] Perlis, Alan (September 1982). “Epigrams on Program-ming”. SIGPLAN Notices Vol. 17, No. 9. pp. 7–13.

[58] Milner, R.; M. Tofte, R. Harper and D. MacQueen.(1997). The Definition of Standard ML (Revised). MITPress. ISBN 0-262-63181-4. Cite uses deprecated pa-rameter |coauthors= (help)

[59] Kelsey, Richard; William Clinger; Jonathan Rees (Febru-ary 1998). “Section 7.2 Formal semantics”. Revised5 Re-port on the Algorithmic Language Scheme. Retrieved 9June 2006.

[60] ANSI — Programming Language Rexx, X3-274.1996

[61] “HOPL: an interactive Roster of Programming Lan-guages”. Australia: Murdoch University. Retrieved 1June 2009. This site lists 8512 languages.

[62] Mayer, Philip; Bauer, Alexander (1 January 2015).“An Empirical Analysis of the Utilization of Multi-ple Programming Languages in Open Source Projects”.EASE '15. New York, NY, USA: ACM: 4:1–4:10. doi:10.1145/2745802.2745805. ISBN 978-1-4503-3350-4. Retrieved 18 September 2015. Results:We found (a) a mean number of 5 languages per projectwith a clearly dominant main general-purpose languageand 5 often-used DSL types, (b) a significant influenceof the size, number of commits, and the main languageon the number of languages as well as no significant in-fluence of age and number of contributors, and (c) threelanguage ecosystems grouped around XML, Shell/Make,and HTML/CSS. Conclusions: Multi-language program-ming seems to be common in open-source projects andis a factor which must be dealt with in tooling and whenassessing development and maintenance of such softwaresystems.

[63] Abelson, Sussman, and Sussman. “Structure and Interpre-tation of Computer Programs”. Retrieved 3 March 2009.

[64] Brown Vicki (1999). “Scripting Languages”.mactech.com. Retrieved November 17, 2014.

[65] Georgina Swan (2009-09-21). “COBOL turns 50”. com-puterworld.com.au. Retrieved 2013-10-19.

[66] Ed Airey (2012-05-03). “7 Myths of COBOL De-bunked”. developer.com. Retrieved 2013-10-19.

[67] Nicholas Enticknap. “SSL/Computer Weekly IT salarysurvey: finance boom drives IT job growth”. Computer-weekly.com. Retrieved 2013-06-14.

[68] “Counting programming languages by book sales”.Radar.oreilly.com. 2 August 2006. Retrieved 3 Decem-ber 2010.

[69] Bieman, J.M.; Murdock, V., Finding code on the WorldWide Web: a preliminary investigation, Proceedings FirstIEEE International Workshop on Source Code Analysisand Manipulation, 2001

[70] “Programming Language Popularity”. langpop.com.2013-10-25. Retrieved 2014-01-02.

[71] Carl A. Gunter, Semantics of Programming Languages:Structures and Techniques, MIT Press, 1992, ISBN 0-262-57095-5, p. 1

[72] “TUNES: Programming Languages”.

[73] Wirth, Niklaus (1993). “Recollections about the devel-opment of Pascal”. Proc. 2nd ACM SIGPLAN con-ference on history of programming languages: 333–342.doi:10.1145/154766.155378. ISBN 0-89791-570-4. Re-trieved 30 June 2006.

10 Further reading

See also: History of programming languages § Furtherreading

• Abelson, Harold; Sussman, Gerald Jay (1996).Structure and Interpretation of Computer Programs(2nd ed.). MIT Press.

• Raphael Finkel: Advanced Programming LanguageDesign, Addison Wesley 1995.

• Daniel P. Friedman, Mitchell Wand, Christopher T.Haynes: Essentials of Programming Languages, TheMIT Press 2001.

• Maurizio Gabbrielli and Simone Martini: “Pro-gramming Languages: Principles and Paradigms”,Springer, 2010.

• David Gelernter, Suresh Jagannathan: ProgrammingLinguistics, The MIT Press 1990.

• Ellis Horowitz (ed.): Programming Languages, aGrand Tour (3rd ed.), 1987.

• Ellis Horowitz: Fundamentals of Programming Lan-guages, 1989.

• Shriram Krishnamurthi: Programming Languages:Application and Interpretation, online publication.

• Bruce J. MacLennan: Principles of ProgrammingLanguages: Design, Evaluation, and Implementa-tion, Oxford University Press 1999.

Page 13: Programminglanguage · Programminglanguage SourcecodeofasimplecomputerprogramwrittenintheCpro-gramminglanguage,whichwilloutputthe"Hello,world!"mes-sagewhencompiledandrun

13

• John C. Mitchell: Concepts in Programming Lan-guages, Cambridge University Press 2002.

• Benjamin C. Pierce: Types and Programming Lan-guages, The MIT Press 2002.

• Terrence W. Pratt and Marvin V. Zelkowitz: Pro-gramming Languages: Design and Implementation(4th ed.), Prentice Hall 2000.

• Peter H. Salus. Handbook of Programming Lan-guages (4 vols.). Macmillan 1998.

• Ravi Sethi: Programming Languages: Concepts andConstructs, 2nd ed., Addison-Wesley 1996.

• Michael L. Scott: Programming Language Pragmat-ics, Morgan Kaufmann Publishers 2005.

• Robert W. Sebesta: Concepts of Programming Lan-guages, 9th ed., Addison Wesley 2009.

• Franklyn Turbak and David Gifford with MarkSheldon: Design Concepts in Programming Lan-guages, The MIT Press 2009.

• Peter Van Roy and Seif Haridi. Concepts, Tech-niques, and Models of Computer Programming, TheMIT Press 2004.

• David A. Watt. Programming Language Conceptsand Paradigms. Prentice Hall 1990.

• David A. Watt and Muffy Thomas. ProgrammingLanguage Syntax and Semantics. Prentice Hall1991.

• David A. Watt. Programming Language Processors.Prentice Hall 1993.

• David A. Watt. Programming Language DesignConcepts. John Wiley & Sons 2004.

Page 14: Programminglanguage · Programminglanguage SourcecodeofasimplecomputerprogramwrittenintheCpro-gramminglanguage,whichwilloutputthe"Hello,world!"mes-sagewhencompiledandrun

14 11 TEXT AND IMAGE SOURCES, CONTRIBUTORS, AND LICENSES

11 Text and image sources, contributors, and licenses

11.1 Text

• Programming language Source: https://en.wikipedia.org/wiki/Programming_language?oldid=740221984 Contributors: MagnusManske,Matthew Woodcraft, Derek Ross, LC~enwiki, Brion VIBBER, Mav, Koyaanis Qatsi, AstroNomer, Jeronimo, Ap, Malcolm Farmer,AlexWasFirst, Rjstott, Andre Engels, Fubar Obfusco, SimonP, Merphant, FvdP, Imran, Rlee0001, B4hand, Stevertigo, Hfastedge, Den-nisDaniels, Edward, K.lee, Michael Hardy, Tim Starling, Chris-martin, Kwertii, Nixdorf, MartinHarper, Ixfd64, TakuyaMurata, Karingo,Minesweeper, Ahoerstemeier, Nanshu, Angela, Kragen, Poor Yorick, Nikai, Andres, Grin, Evercat, TonyClarke, ²¹², Jonik, Mxn, Vivin,Speuler, Dave Bell, Dcoetzee, Reddi, Ww,Mac c, Dysprosia, Jitse Niesen, Gutza, Doradus, Zoicon5, 2988, Taxman, ZeWrestler, Bevo, Jph,Jusjih, David.Monniaux, Mrjeff, Finlay McWalter, Pumpie, AlexPlank, Robbot, Noldoaran, Murray Langton, Friedo, Fredrik, Thniels,RedWolf, Altenmann, SmartBee, Romanm, Rursus, Wlievens, Hadal, Borislav, Lupo, BigSmoke, Gwicke~enwiki, Tea2min, AnchetaWis, Gploc, Centrx, Giftlite, Thv, Dtaylor1984, Akadruid, PaulFord, Cobaltbluetony, Everyking, Esap, Wikibob, Mellum, Jorend, AJim,Bonaovox~enwiki, Behnam, Ptk~enwiki, Macrakis, VampWillow, Bobblewik, Wmahan, Vadmium, Quagmire, Yath, Beland, Elembis,Jossi, Phil Sandifer, DenisMoskowitz, Marcos, RainerBlome, Addicted2Sanity, Joyous!, Positron, Quota, Teval~enwiki, Zondor, Damieng,EagleOne, Gazpacho, Mike Rosoft, Brianjd, SimonEast, Yana209, Noisy, Zaheen, Rich Farmbrough, Leibniz, Jpk, HeikoEvermann, Luluof the Lotus-Eaters, LindsayH, Michael Zimmermann, Paul August, Bender235, ESkog, Kbh3rd, Ben Standeven, Danakil, CanisRufus,Hayabusa future, Shanes, Dgpop, Bobo192, AmosWolfe, Mpils, L33tminion, SpeedyGonsales, Photonique, Tgr, Saccade, Kickstart70,Sam Korn, Phyzome, Simplyanil, Alansohn, Liao, Guy Harris, DiegoMoya, Jeltz, Krischik, Wtmitchell, Suruena, Omphaloscope, Zawersh,Voxadam, HenryLi, KTC, Forderud, Oleg Alexandrov, Mahanga, Revived, Infinoid, Roland2~enwiki, Hoziron, Woohookitty, NewbieDoo,Mu301, Nuggetboy, Ilario, Oldadamml, Nameneko, Ruud Koot, Goodgerster, Brentdax, KymFarnik, Dolfrog, Davidfstr, Mangojuice, Tou-ssaint, Marudubshinki, Yoric~enwiki, Chun-hian, Kbdank71, Mendaliv, Pwv1, Icey, Ketiltrout, Sjakkalle, Rjwilmsi, Tizio, Angusmclel-lan, Koavf, Swirsky, Wikibofh, Amire80, Quiddity, Bruce1ee, Oblivious, Ligulem, DouglasGreen~enwiki, Bubba73, Reinis, GregAsche,JanSuchy, Fantom~enwiki, FlaBot, Mathbot, Undeference, Nihiltres, Harmil, Vsion, Xavier Combelle, RexNL, Ewlyahoocom, Gurch,Mpradeep, Quuxplusone, Tysto, Kri, Windharp, Chobot, Bgwhite, ColdFeet, Wavelength, Hairy Dude, RussBot, Hyad, Arado, Robert AWest, Taejo, Davidpdx, Bhny, Pi Delport, KSmrq, SpuriousQ, Edward301, Stephenb, Gaius Cornelius, Rsrikanth05, Wimt, CarlHewitt,EngineerScotty, NawlinWiki, Wiki alf, Jaxl, Johann Wolfgang, BirgitteSB, Mccready, Brandon, Jpbowen, JulesH, Sekelsenmat, Nick C,Tony1, Slaad, Natkeeran, BOT-Superzerocool, DeadEyeArrow, Perry Middlemiss, Ms2ger, Pooryorick~enwiki, WAS 4.250, Novasource,Zero1328, Rushyo, Closedmouth, Jwissick, Kuciwalker, Cedar101, Peter, Donhalcon, Vahid83, Katieh5584, Kungfuadam, TuukkaH, DVDRW, SmackBot, Tarret, Slashme, KnowledgeOfSelf, Lagalag, Vald, Brick Thrower, Alksub, Monz, ElAmericano, Xaosflux, Gilliam, DukeGanote, Ohnoitsjamie, Bh3u4m, Bluebot, Klasbricks, LinguistAtLarge, JMSwtlk, Persian Poet Gal, SeeAnd, MK8, Jprg1966, Thumper-ward, Fplay, EncMstr, Victorgrigas, RayAYang, Nbarth, Royboycrashfan, Can't sleep, clown will eat me, Rrburke, Allan McInnes, -Barry-,Cybercobra, Nick125, MisterCharlie, HarisM, Hammer1980, DMacks, MegaHasher, Vriullop, Derek farn, Ser Amantio di Nicolao, Water-fles, Zarniwoot, Antonielly, JohnWittle, Ckatz, 16@r, A. Parrot, Eivind F Øyangen, Dan128, Slakr, Alhoori, Pieguy48, Xionbox, Dl2000,SubSeven, Hu12, Stephen B Streater, Iridescent, Dreftymac, DavidHOzAu, Tawkerbot2, Vkhaitan, Switchercat, INkubusse, Acacix, Ahy1,Georg Peter, Kris Schnee, Green caterpillar, Burkedavis, Jaxad0127, ShelfSkewed, MarsRover, Napi, Ezrakilty, Charlie Huggard, Ubiq,Krauss, RenamedUser2, Fl, Peterdjones, Jason5ayers, Blaisorblade, Torc2, NotQuiteEXPComplete, Mattisse, Malleus Fatuorum, Epbr123,Qwyrxian, N5iln, Headbomb, John254, Merbabu, Ideogram, AccurateOne, Natalie Erin, Escarbot, Acaciz, AntiVandalBot, Tewy, Gioto,Luna Santin, Seaphoto, MHoover, Prolog, Jj137, Science History, VictorAnyakin, KHaskell, JAnDbot, JaK81600~enwiki, MER-C, IanOs-good, Andonic, Hut 8.5, PhilKnight, Four Dog Night, VoABot II, Necklace, Foobah, Tedickey, Catgut, Indon, JohnLai, Abednigo, Mkdw,ArmadilloFromHell, DerHexer, Philg88, Khalid Mahmood, Calltech, Gwern, Kiminatheguardian, MartinBot, Benjaminct, Mschel, Au-tocratique, Tgeairn, J.delanoy, Pharaoh of the Wizards, Kimse, Trusilver, Giorgios (usurped), Ntalamai, Abeliavsky, Macaldo, Jesant13,Acalamari, It Is Me Here, LordAnubisBOT, McSly, Nemo bis, Dominator09, SparsityProblem, Raise exception, NewEnglandYankee,Rwessel, Ohms law, Cmichael, Ultra two, Juliancolton, LordCo Centre, Don't Copy That Floppy, Useight, Izno, Steel1943, Idioma-bot, Fu-nandtrvl, Reelrt, Ottershrew, Red Thrush’s Bot, VolkovBot, Cireshoe, Philip Trueman, Oshwah, Muro de Aguas, Charlesriver, Tomatensaft,Lradrama, K12308025, BwDraco, Sgbirch, Noformation, MearsMan, PlayStation 69, Andy Dingley, Yk Yk Yk, Cnilep, AlleborgoBot,Knyf, S.Örvarr.S, EJF, SieBot, ATS, Sonicology, Tiddly Tom, Speed Air Man, Bill122, Krawi, Timhowardriley, Logarkh, Jerryobject,Mwaisberg, Bentogoa, Happysailor, Flyer22 Reborn, Ranafon, Ferret, Faradayplank, Lightmouse, Techman224, BenoniBot~enwiki, ShaneA. Bender, HighInBC, ClueBot, CSProfBill, The Thing That Should Not Be, VsBot, Alliswellthen, Kedearian, Mild Bill Hiccup, Blan-chardb, Takeaway, Robert Skyhawk, Iwantitalllllllll, Skytreader, Jotterbot, Hans Adler, Noosentaal, MelonBot, Chinabuffalo, SoxBot III,HopeChrist, Darkicebot, Naderi 8189, Cp15, Slashem, Noctibus, MystBot, Dsimic, Addbot, JPINFV, L Gottschalk, DOI bot, Ronhjones,Fieldday-sunday, Mentisock, Roux, Favonian, LinkFA-Bot, Systemetsys, Wikisedia~enwiki, Tide rolls, Krano, Gail, Jarble, Andylmur-phy, Ben Ben, Legobot, Luckas-bot, Yobot, Midinastasurazz, OrgasGirl, Fraggle81, TaBOT-zerem, Abram.carolan, Pcap, Ningauble,Peter Flass, Conor123777, AnomieBOT, Nottsadol, 1exec1, Jim1138, Galoubet, Ulric1313, Lucian1900, Materialscientist, Citation bot,Maxis ftw, Fayt82, MauritsBot, Xqbot, Capricorn42, Jeffrey Mall, Gilo1969, XZeroBot, Miym, GrouchoBot, Papercutbiology, RibotBOT,Gbruin, Russell Joseph McCann, Shadowjams, A.amitkumar, Apwestern, Captain-n00dle, Manpreett, Edgars2007, FrescoBot, Mark Re-nier, Mìthrandir, DivineAlpha, Citation bot 1, I dream of horses, Elockid, HRoestBot, LittleWink, 10metreh, Jonesey95, Jschnur, Σ, RoboCop, Txt.file, Trappist the monk, Cmdodanli, نوری ,ئاراس Callanecc, TheTechFan, Specs112, Diannaa, WikiTome, Suffusion of Yel-low, Stroppolo, Vaibhavkanwal, DARTH SIDIOUS 2, Mean as custard, TomT0m, John lindgren, EmausBot, Orphan Wiki, Nima1024,Carbo1200, Nutsnbolts222, Cogiati, Iuliatoyo, H3llBot, Karthikndr, Swatiri, Jguy, Noodleki, Carmichael, BioPupil, DASHBotAV, ClueBotNG, A520, Mesoderm, Asukite, Snickel11, Danim, Helpful Pixie Bot, DBigXray, BG19bot, Krenair, Kangaroopower, Wiki13, MusikAn-imal, J991, Compfreak7, Loriendrew, Nbrothers, Thomasuniko, Usman&muzammal, Teammm, Bobbygammill, Amitkumargarg88, Cy-berbot II, Dexbot, Rezonansowy, Majilis, Damian.rouson, Steamerandy, Kooginup, Svensson1, Cathry, Ueutyi, Seanhalle, Vanamonde93,Thetimperson, Grouphardev, Carrot Lord, François Robere, Wiki4Blog, Olmerta, Tentinator, Captain Conundrum, Komarov om, Al-hade, Uwe Lück, Ginsuloft, Inaaaa, Danielmask, Racer Omega, Lucky7-phool, Impsswoon, Fastdrummer, Monkbot, Theanimalover, Ab-dallasyam, Wildkrat52, Whikie, PotatoNinja, Malistomailie, TheMacroChip, Papapasan, Dorivaldo de C. M. dos Santos, Bridgetlane,TaqPol, Esquivalience, Rubbish computer, Some Gadget Geek, Lee Ann Dickerson, Infinite0694, Rajat293, Nickag989, KasparBot, JoseDiaz Sanchez Pablo Garica Flores, Aro88, Grabtricks, The Quixotic Potato, LibbyLaneLonne, 45La45Lo33, Lukaslt13, Sahil qutub, Qzd,Music1201, CaptainGummyBearz, Eestrella198, Ushkin N, Arbor Fici, Allynykaza and Anonymous: 782

Page 15: Programminglanguage · Programminglanguage SourcecodeofasimplecomputerprogramwrittenintheCpro-gramminglanguage,whichwilloutputthe"Hello,world!"mes-sagewhencompiledandrun

11.2 Images 15

11.2 Images• File:8bit-dynamiclist_(reversed).gif Source: https://upload.wikimedia.org/wikipedia/commons/c/cc/8bit-dynamiclist_%28reversed%

29.gif License: CC-BY-SA-3.0 Contributors: This file was derived from: 8bit-dynamiclist.gifOriginal artist: Seahen, User:Rezonansowy

• File:Bangalore_India_Tech_books_for_sale_IMG_5261.jpg Source: https://upload.wikimedia.org/wikipedia/commons/1/19/Bangalore_India_Tech_books_for_sale_IMG_5261.jpg License: CC BY-SA 3.0 Contributors: Own work Original artist: Victorgrigas

• File:C_Hello_World_Program.png Source: https://upload.wikimedia.org/wikipedia/commons/3/39/C_Hello_World_Program.png Li-cense: CC0 Contributors: Own work Original artist: Esquivalience

• File:Commons-logo.svg Source: https://upload.wikimedia.org/wikipedia/en/4/4a/Commons-logo.svg License: CC-BY-SA-3.0 Contribu-tors: ? Original artist: ?

• File:Folder_Hexagonal_Icon.svg Source: https://upload.wikimedia.org/wikipedia/en/4/48/Folder_Hexagonal_Icon.svg License: Cc-by-sa-3.0 Contributors: ? Original artist: ?

• File:Internet_map_1024.jpg Source: https://upload.wikimedia.org/wikipedia/commons/d/d2/Internet_map_1024.jpg License: CC BY2.5 Contributors: Originally from the English Wikipedia; description page is/was here. Original artist: The Opte Project

• File:Manchester_Mark2.jpg Source: https://upload.wikimedia.org/wikipedia/en/d/d8/Manchester_Mark2.jpg License: Fair useContrib-utors:http://www.computer50.org/mark1/ip-mm1.mark1.html Original artist: ?

• File:Python_add5_parse.png Source: https://upload.wikimedia.org/wikipedia/commons/a/ac/Python_add5_parse.png License: Publicdomain Contributors: Transferred from en.wikipedia to Commons. Original artist: Lulu of the Lotus-Eaters at English Wikipedia

• File:Python_add5_syntax.svg Source: https://upload.wikimedia.org/wikipedia/commons/e/e1/Python_add5_syntax.svg License: Copy-righted free use Contributors: http://en.wikipedia.org/wiki/Image:Python_add5_syntax.png Original artist: Xander89

• File:Question_book-new.svg Source: https://upload.wikimedia.org/wikipedia/en/9/99/Question_book-new.svg License: Cc-by-sa-3.0Contributors:Created from scratch in Adobe Illustrator. Based on Image:Question book.png created by User:Equazcion Original artist:Tkgd2007

• File:Symbol_list_class.svg Source: https://upload.wikimedia.org/wikipedia/en/d/db/Symbol_list_class.svg License: Public domain Con-tributors: ? Original artist: ?

• File:Symbol_neutral_vote.svg Source: https://upload.wikimedia.org/wikipedia/en/8/89/Symbol_neutral_vote.svg License: Public do-main Contributors: ? Original artist: ?

• File:Wikibooks-logo.svg Source: https://upload.wikimedia.org/wikipedia/commons/f/fa/Wikibooks-logo.svg License: CC BY-SA 3.0Contributors: Own work Original artist: User:Bastique, User:Ramac et al.

• File:Wikidata-logo.svg Source: https://upload.wikimedia.org/wikipedia/commons/f/ff/Wikidata-logo.svg License: Public domain Con-tributors: Own work Original artist: User:Planemad

• File:Wikinews-logo.svg Source: https://upload.wikimedia.org/wikipedia/commons/2/24/Wikinews-logo.svg License: CC BY-SA 3.0Contributors: This is a cropped version of Image:Wikinews-logo-en.png. Original artist: Vectorized by Simon 01:05, 2 August 2006 (UTC)Updated by Time3000 17 April 2007 to use official Wikinews colours and appear correctly on dark backgrounds. Originally uploaded bySimon.

• File:Wikiquote-logo.svg Source: https://upload.wikimedia.org/wikipedia/commons/f/fa/Wikiquote-logo.svg License: Public domainContributors: Own work Original artist: Rei-artur

• File:Wikiversity-logo-Snorky.svg Source: https://upload.wikimedia.org/wikipedia/commons/1/1b/Wikiversity-logo-en.svg License:CC BY-SA 3.0 Contributors: Own work Original artist: Snorky

• File:Wiktionary-logo-v2.svg Source: https://upload.wikimedia.org/wikipedia/commons/0/06/Wiktionary-logo-v2.svg License: CC BY-SA 4.0 Contributors: Own work Original artist: Dan Polansky based on work currently attributed to Wikimedia Foundation but originallycreated by Smurrayinchester

11.3 Content license• Creative Commons Attribution-Share Alike 3.0