Basa program: Béda antarrépisi

Konten dihapus Konten ditambahkan
Shrikarsan (obrolan | kontribusi)
Removing Link FA template as it is now available in wikidata
m Ngarapihkeun éjahan, replaced: oge → ogé , nyaeta → nyaéta (5), make → maké (2), rea → réa (14), yen → yén (2), dipake → dipaké (6), ea → éa (44), kabeh → kabéh using AWB
Baris ka-1:
'''Basa program''' nyaetanyaéta [[basa jieunan]] nu bisa dipakedipaké keur [[Control#Science and Technology|ngadalikeun]] paripolah hiji mesin, utamana [[komputer]].<ref>[http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=33636 ISO 5127]—Information and documentation—Vocabulary, clause 01.05.10, defines a programming language as: an artificial language for expressing programs</ref> Basa program, saperti [[basa alami]], dihartikeun ku aturan ''[[sintaks]]is'' jeung ''[[semantik]]'' keur ngajelaskeun struktur jeung hartina. Loba basa program nu mibanda sababaraha wanda dina nuliskeun ''sintaks'' jeung ''semantik''; sababaraha basa program ngan dihartikeun ku sawanda dina cara makemaké sacara resmi.
 
Basa program dipakedipaké keur mantuan komunikasi dina raraga ngokolakeun pangaweruh tur nembongkeun [[algoritma]] sacara presisi. Sababaraha pangarang mere watesan nu leuwih heureut yenyén "basa program" nyaetanyaéta basa nu bisa dipakedipaké keur ngagambarkeun ''sakabeh'' algoritma nu mungkin;<ref>In mathematical terms, this means the programming language is [[Turing-complete]] {{cite book | last=MacLennan | first=Bruce J. | title=Principles of Programming Languages | page=1 | publisher=Oxford University Press | year=1987 | id=ISBN 0-19-511306-3 }}</ref> kadangkala watesan "[[computer language|basa komputer]]" dipakedipaké keur basa jieunan nu leuwih heureut.
 
[[Alphabetical list of programming languages|Rebuan basa program nu beda-beda]]<ref>[[as of 2006|As of May 2006]] [http://hopl.murdoch.edu.au/ The Encyclopedia of Computer Languages] by [[Murdoch University]], [[Australia]] lists 8512 computer languages.</ref> geus dijieun, tur meh unggal taun dijieun basa program nu anyar.
 
== Harti ==
Sifat penting keur nangtukeun pilihan basa program nyaetanyaéta:
 
* ''Fungsi:'' Basa program nyaetanyaéta basa nu pake keur nulis [[computer program|program komputer]], kaasup tampilan [[komputer]] dina sababaraha [[computation|komputasi]]<ref>{{cite web|author=[[Association for Computing Machinery|ACM]] SIGPLAN|title=Bylaws of the Special Interest Group on Programming Languages of the Association for Computing Machinery|url=http://www.acm.org/sigs/sigplan/sigplan_bylaws.htm|accessdate=2006-06-19|year=2003}}, ''The scope of SIGPLAN is the theory, design, implementation, description, and application of computer programming languages - languages that permit the specification of a variety of different computations, thereby providing the user with significant control (immediate or delayed) over the computer's operation.''</ref> atawa [[algoritma]] sarta bisa ogeogé salaku alat kadali luar saperti [[Computer printer|printer]], robot<ref name="robots">{{cite web|url=http://www.cs.brown.edu/people/tld/courses/cs148/02/programming.html |title=Programming Robots |accessdate=2006-09-23 |last=Dean |first=Tom |date= |year=2002 |work=Building Intelligent Robots |publisher=Brown University Department of Computer Science}}</ref>, jeung nu sejenna.
* ''Target:'' Basa program beda jeung [[natural language|basa alami]] yenyén dina basa alami ngan dipakedipaké keur antar manusa, sedengkeun dina basa program ngawenangkeun jalma keur nyieun parentah kana mesin. Sababaraha basa program dupake keur alat ngadalikeun nu sejenna. Contona program [[PostScript]] remen dijieun ku basa program sejenna keur ngadalikeun [[computer printer|printer]] atawa tampila.
 
* ''Konsep:'' Basa program mibanda sababaraha kompnen keur ngartikeun tur ngokolakeun [[data structure|struktur data]] atawa ngadalikeun [[control flow|kaputusan aliran]].
* ''Target:'' Basa program beda jeung [[natural language|basa alami]] yen dina basa alami ngan dipake keur antar manusa, sedengkeun dina basa program ngawenangkeun jalma keur nyieun parentah kana mesin. Sababaraha basa program dupake keur alat ngadalikeun nu sejenna. Contona program [[PostScript]] remen dijieun ku basa program sejenna keur ngadalikeun [[computer printer|printer]] atawa tampila.
* ''Kakuatan ekspresi:'' [[theory of computation|Teori komputasi]] misahkeun basa ku itungan nu bisa ditembongkeun (tempo [[Chomsky hierarchy|hirarki Chomsky]]). SakabehSakabéh basa [[Turing complete|Turing lengkep]] bisa dipakedipaké kana runtuyan [[algoritma]] nu sarua. [[SQL|ANSI/ISO SQL]] jeung [[Charity programming language|Charity]] conto basa Turing teu lengkep nu ilahar disebut basa program.<ref>{{cite web | author=Digital Equipment Corporation | title=Information Technology - Database Language SQL (Proposed revised text of DIS 9075) | url=http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt | work=ISO/IEC 9075:1992, Database Language SQL | accessdate=June 29 | accessyear=2006}}</ref><ref>{{cite web|author=The Charity Development Group|title=The CHARITY Home Page | url=http://pll.cpsc.ucalgary.ca/charity1/www/home.html | month=December|year=1996|accessdate=2006-06-29}}, ''Charity is a categorical programming language...'', ''All Charity computations terminate.''</ref>
 
* ''Konsep:'' Basa program mibanda sababaraha kompnen keur ngartikeun tur ngokolakeun [[data structure|struktur data]] atawa ngadalikeun [[control flow|kaputusan aliran]].
 
* ''Kakuatan ekspresi:'' [[theory of computation|Teori komputasi]] misahkeun basa ku itungan nu bisa ditembongkeun (tempo [[Chomsky hierarchy|hirarki Chomsky]]). Sakabeh basa [[Turing complete|Turing lengkep]] bisa dipake kana runtuyan [[algoritma]] nu sarua. [[SQL|ANSI/ISO SQL]] jeung [[Charity programming language|Charity]] conto basa Turing teu lengkep nu ilahar disebut basa program.<ref>{{cite web | author=Digital Equipment Corporation | title=Information Technology - Database Language SQL (Proposed revised text of DIS 9075) | url=http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt | work=ISO/IEC 9075:1992, Database Language SQL | accessdate=June 29 | accessyear=2006}}</ref><ref>{{cite web|author=The Charity Development Group|title=The CHARITY Home Page | url=http://pll.cpsc.ucalgary.ca/charity1/www/home.html | month=December|year=1996|accessdate=2006-06-29}}, ''Charity is a categorical programming language...'', ''All Charity computations terminate.''</ref>
 
Basa non-komputasi, saperti [[markup language|basa markup]] siga [[HTML]] atawa [[formal grammar]] siga [[Backus–Naur form|BNF]], ilaharna teu disebut basa program. Ilaharna basa program ditambahkeun kana basa non-itungan ieu.
 
== Kaperluan ==
Kaperluan utama basa program nyaetanyaéta keur mere parentah kana komputer. Saperti, basa program beda jeung ekspresi jalma nu mana merlukeun presisi nu luhur tur lengkep. Waktu ngagunakan hiji basa alam keur ngobrol jeung jalma sejen, pangarang jeung nu ngobrol bisa bingung tur nyieun saeutik kasalahan, sarta duana masih bisa ngarti. Beda jeung komputer nu sarua jeung naon anu diparentahkeun ka manehna, teu bisa ngarti kana kode nu nyieun program "nu dimaksud" keur nulis. Kombinasi harti basa, [[computer program|program]], jeung asupan program kudu sacara husus ngartikeun paripolah luar nu bakal kajadian lamun etaéta program dijalankeun.
 
{{tarjamahkeun|Inggris}}
Baris 28 ⟶ 25:
* Programmers range in expertise from novices who need simplicity above all else, to experts who may be comfortable with considerable complexity.
* Programs must balance speed, size, and simplicity on systems ranging from [[microcontroller]]s to [[supercomputer]]s.
* Programs may be written once and not change for generations, or they may undergo nearlynéarly constant modification.
* Finally, programmers may simply differ in their tastes: they may be accustomed to discussing problems and expressing them in a particular language.
 
One common trend in the development of programming languages has been to add more ability to solve problems using a higher level of [[Abstraction (computer science)|abstraction]]. The earliestéarliest programming languages were tied very closely to the underlying hardware of the computer. As new programming languages have developed, featuresféatures have been added that let programmers express ideasidéas that are more removed from simple translation into underlying hardware instructions. Because programmers are less tied to the needs of the computer, their programs can do more computing with less effort from the programmer. This lets them write more programs in the same amount of time.<ref> Frederick P. Brooks, Jr.: ''The Mythical Man-Month,'' Addison-Wesley, 1982, pp. 93-94 </ref>
 
[[Natural language and computation|Natural language processors]] have been proposed as a way to eliminate the need for a specialized language for programming. However, this goal remains distant and its benefits are open to debate. [[Edsger Dijkstra]] took the position that the use of a formal language is essential to prevent the introduction of meaninglessméaningless constructs, and dismissed natural language programming as "foolish."<ref>Dijkstra, Edsger W. [http://www.cs.utexas.edu/users/EWD/transcriptions/EWD06xx/EWD667.html On the foolishness of "natural language programming."] EWD667.</ref> [[Alan Perlis]] was similarly dismissive of the ideaidéa.<ref>Perlis, Alan, [http://www-pu.informatik.uni-tuebingen.de/users/klaeren/epigrams.html Epigrams on Programming]. SIGPLAN Notices Vol. 17, No. 9, September 1982, pp. 7-13</ref>
 
== Elements ==
Baris 42 ⟶ 39:
A programming language's surface form is known as its [[syntax]]. Most programming languages are purely textual; they use sequences of text including words, numbers, and punctuation, much like written natural languages. On the other hand, there are some programming languages which are more [[visual programming language|graphical]] in nature, using spatial relationships between symbols to specify a program.
 
The syntax of a language describes the possible combinations of symbols that form a syntactically correct program. The meaningméaning given to a combination of symbols is handled by semantics. Since most languages are textual, this article discusses textual syntax.
 
Programming language syntax is usually defined using a combination of [[regular expression]]s (for [[lexical analysis|lexical]] structure) and [[Backus-Naur Form]] (for [[context-free grammar|grammatical]] structure). Below is a simple grammar, based on [[Lisp programming language|Lisp]]:
Baris 63 ⟶ 60:
The following are examples of well-formed token sequences in this grammar: '<code>12345</code>', '<code>()</code>', '<code>(a b c232 (1))</code>'
 
Not all syntactically correct programs are semantically correct. Many syntactically correct programs are nonetheless ill-formed, per the language's rules; and may (depending on the language specification and the soundness of the implementation) result in an error on translation or execution. In some cases, such programs may exhibit [[undefined behavior]]. Even when a program is well-defined within a language, it may still have a meaningméaning that is not intended by the person who wrote it.
 
Using [[natural language]] as an example, it may not be possible to assign a meaningméaning to a grammatically correct sentence or the sentence may be false:
* "[[Colorless green ideas sleep furiously]]." is grammatically well-formed but has no generally accepted meaningméaning.
* "John is a married bachelor." is grammatically well-formed but expresses a meaningméaning that cannot be true.
 
The following C language fragment is syntactically correct, but performs an operation that is not semantically defined (because <tt>p</tt> is a [[null pointer]], the operations <tt>p->realréal</tt> and <tt>p->im</tt> have no meaningméaning):
 
complex *p = NULL;
complex abs_p = sqrt (p->realréal * p->realréal + p->im * p->im);
 
The grammar needed to specify a programming language can be classified by its position in the [[Chomsky hierarchy]]. The syntax of most programming languages can be specified using a Type-2 grammar, i.e., they are [[context-free grammar]]s.<ref>{{cite book|author = [[Michael Sipser]] | year = 1997 | title = Introduction to the Theory of Computation | publisher = PWS Publishing | id = ISBN 0-534-94728-X}} Section 2.2: Pushdown Automata, pp.101–114.</ref>
Baris 80 ⟶ 77:
{{details|Type safety}}
 
A type system defines how a programming language classifies values and expressions into ''types'', how it can manipulate those types and how they interact. This generally includes a description of the [[data structure]]s that can be constructed in the language. The design and study of type systems using formal mathematics is known as ''[[type theory]]''.
 
Internally, all [[data]] in modern digital computers are stored simply as zeros or ones ([[Binary numeral system|binary]]).
 
==== Typed versus untyped languages ====
A language is ''typed'' if operations defined for one data type cannot be performed on values of another data type.<ref name="typing">{{cite web | url=http://www.acooke.org/andrew/writing/lang.html#sec-types | author=Andrew Cooke | title=An Introduction to Programming Languages | accessdate=June 30 | accessyear=2006}}</ref> For example, "<code>this text between the quotes</code>" is a string. In most programming languages, dividing a number by a string has no meaningméaning. Most modern programming languages will therefore reject any program attempting to perform such an operation. In some languages, the meaninglessméaningless operation will be detected when the program is compiled ("static" type checking), and rejected by the compiler, while in others, it will be detected when the program is run ("dynamic" type checking), resulting in a runtime [[Exception handling|exception]].
 
A special case of typed languages are the ''single-type'' languages. 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 both symbolic and numeric data.
Baris 91 ⟶ 88:
In contrast, an ''untyped language'', such as most [[assembly language]]s, allows any operation to be performed on any data, which are generally considered to be sequences of bits of various lengths.<ref name="typing"/> High-level languages which are untyped include [[BCPL]] and some varieties of [[Forth (programming language)|Forth]].
 
In practice, while few languages are considered typed from the point of view of [[type theory]] (verifying or rejecting ''all'' operations), most modern languages offer a degree of typing.<ref name="typing"/> Many production languages provide meansméans to bypass or subvert the type system.
 
==== Static versus dynamic typing ====
In ''[[static typing]]'' all expressions have their types determined prior to the program being run (typically at compile-time). For example, 1 and (2+2) are integer expressions; they cannot be passed to a function that expects a string, or stored in a variable that is defined to hold dates.<ref name="typing"/>
 
Statically-typed languages can be ''manifestly typed'' or ''[[type inference|type-inferred]]''. In the first case, the programmer must explicitly write types at certain textual positions (for example, at variable [[declaration (computer science)|declarations]]). In the second case, the compiler ''infers'' the types of expressions and declarations based on context. Most mainstreammainstréam statically-typed languages, such as [[C Plus Plus|C++]] and [[Java (programming language)|Java]], are manifestly typed. Complete type inference has traditionally been associated with less mainstreammainstréam languages, such as [[Haskell (programming language)|Haskell]] and [[ML programming language|ML]]. However, many manifestly typed languages support partial type inference; for example, [[Java (programming language)|Java]] and [[C Sharp|C#]] both infer types in certain limited cases.<ref>Specifically, instantiations of [[generic programming|generic]] types are inferred for certain expression forms. Type inference in Generic Java—the research language that provided the basis for Java 1.5's bounded [[parametric polymorphism]] extensions—is discussed in two informal manuscripts from the [[Types mailing list]]: [http://www.seas.upenn.edu/~sweirich/types/archive/1999-2003/msg00849.html Generic Java type inference is unsound] ([[Alan Jeffrey]], 17 Dec 2001) and [http://www.seas.upenn.edu/~sweirich/types/archive/1999-2003/msg00921.html Sound Generic Java type inference] ([[Martin Odersky]], 15 Jan 2002). C#'s type system is similar to Java's, and uses a similar partial type inference scheme.</ref>
''Dynamic typing'', also called ''latent typing'', determines the type-safety of operations at runtime; in other words, types are associated with ''runtime values'' rather than ''textual expressions''.<ref name="typing"/> As with type-inferred languages, dynamically typed languages do not require the programmer to write explicit type annotations on expressions. Among other things, this may permit a single variable to refer to values of different types at different points in the program execution. However, type errors cannot be automatically detected until a piece of code is actually executed, making debugging more difficult. [[Ruby (programming language)|Ruby]], [[Lisp programming language|Lisp]], [[JavaScript]], and [[Python (programming language)|Python]] are dynamically typed.
 
==== Weak and strong typing ====
''Weak typing'' allows a value of one type to be treatedtréated as another, for example treatingtréating a string as a number.<ref name="typing"/> This can occasionally be useful, but it can also allow some kinds of program faults to go undetected at [[compile time]].
 
''Strong typing'' prevents the above. Attempting to mix types raises an error.<ref name="typing"/> Strongly-typed languages are often termed ''type-safe'' or ''[[type safety|safe]]''. Type safety can prevent particular kinds of program faults occurring (because constructs containing them are flagged at compile time).
 
An alternative definition for "weakly typed" refers to languages, such as [[Perl]], [[JavaScript]], and [[C++]] which permit a large number of implicit type conversions; Perl in particular can be characterized as a dynamically typed programming language in which type checking can take place at runtime. See [[type system]]. This capability is often useful, but occasionally dangerous; as it would permit operations whose objects can change type on demand.
 
''Strong'' and ''static'' are generally considered orthogonal concepts, but usage in the literature differs. Some use the term ''strongly typed'' to meanméan ''strongly, statically typed'', or, even more confusingly, to meanméan simply ''statically typed''. Thus [[C (programming language)|C]] has been called both strongly typed and weaklywéakly, statically typed.<ref>{{cite web | url=http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-4.html | title=Revised Report on the Algorithmic Language Scheme (February 20, 1998) | accessdate=June 9 | accessyear=2006}}</ref><ref>{{cite web | url=http://citeseer.ist.psu.edu/cardelli85understanding.html | title=On Understanding Types, Data Abstraction, and Polymorphism | author=[[Luca Cardelli]] and [[Peter Wegner]] | work=Manuscript (1985) | accessdate=June 9 | accessyear=2006}}</ref>.
 
=== Execution semantics ===
Baris 118 ⟶ 115:
Most programming languages have an associated [[library (computer science)|core library]] (sometimes known as the 'Standard library', especially if it is included as part of the published language standard), which is conventionally made available by all implementations of the language. Core libraries typically include definitions for commonly used algorithms, data structures, and mechanisms for input and output.
 
A language's core library is often treatedtréated as part of the language by its users, although the designers may have treatedtréated it as a separate entity. Many language specifications define a core that must be made available in all implementations, and in the case of standardized languages this core library may be required. The line between a language and its core library therefore differs from language to language. Indeed, some languages are designed so that the meaningsméanings of certain syntactic constructs cannot even be described without referring to the core library. For example, in [[Java (programming language)|Java]], a string literal is defined as an instance of the <tt>java.lang.String</tt> class; similarly, in [[Smalltalk]], an [[anonymous function]] expression (a "block") constructs an instance of the library's <tt>BlockContext</tt> class. Conversely, [[Scheme (programming language)|Scheme]] contains multiple coherent subsets that suffice to construct the rest of the language as library macros, and so the language designers do not even bother to say which portions of the language must be implemented as language constructs, and which must be implemented as parts of a library.
 
== Practice ==
Baris 137 ⟶ 134:
| publisher = MIT Press
| year = 1997
| id = ISBN 0-262-63181-4 }}</ref> and [[Scheme (programming language)|Scheme]]<ref>{{cite web|first=Richard |last=Kelsey|coauthors=William Clinger and Jonathan Rees|title=Section 7.2 Formal semantics|work=Revised<sup>5</sup> Report on the Algorithmic Language Scheme|url = http://www.schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-10.html#%_sec_7.2| year=1998|month=February|accessdate=2006-06-09}}</ref> specifications).
* A description of the behavior of a [[compiler|translator]] for the language (e.g., the [[C++]] and [[Fortran]] specifications). The syntax and semantics of the language have to be inferred from this description, which may be written in natural or a formal language.
* A ''reference'' or ''model'' implementation, sometimes written in the language being specified (e.g., [[Prolog]] or [[Rexx|ANSI REXX]]<ref>[[ANSI]] — Programming Language Rexx, X3-274.1996</ref>). The syntax and semantics of the language are explicit in the behavior of the reference implementation.
Baris 145 ⟶ 142:
An '''implementation''' of a programming language provides a way to execute that program on one or more configurations of hardware and software. There are, broadly, two approaches to programming language implementation: ''[[compiler|compilation]]'' and ''[[interpreter (computing)|interpretation]]''. It is generally possible to implement a language using either technique.
 
The output of a [[compiler]] may be executed by hardware or a program called an interpreter. In some implementations that makemaké use of the interpreter approach there is no distinct boundary between compiling and interpreting. For instance, some implementations of the [[BASIC programming language]] compile and then execute the source a line at a time.
 
Programs that are executed directly on the hardware usually run several orders of magnitude faster than those that are interpreted in software.
Baris 170 ⟶ 167:
}}</ref>
 
In the 1940s, the first electrically powered digital computers were createdcréated. The computers of the earlyéarly 1950s, notably the [[UNIVAC I]] and the [[IBM 701]] used [[Machine code|machine language programs]]. [[First-generation programming language|First generation]] machine language programming was quickly superseded by a [[Second-generation programming language|second generation]] of programming languages known as [[Assembly language]]s. Later in the 1950s, assembly language programming, which had evolved to include the use of [[macro instruction]]s, was followed by the development of three higher-level programming languages: [[FORTRAN]], [[Lisp programming language|LISP]], and [[COBOL]]. Updated versions of all of these are still in general use, and importantly, eachéach has strongly influenced the development of later languages.<ref name="influences"> {{cite web
| url=http://www.oreilly.com/news/graphics/prog_lang_poster.pdf
| type=pdf
Baris 177 ⟶ 174:
| accessdate=October 5
| accessyear=2006
}}</ref> At the end of the 1950s, the language formalized as [[Algol 60]] was introduced, and most later programming languages are, in many respects, descendants of Algol.<ref name="influences"/> The format and use of the earlyéarly programming languages was heavilyhéavily influenced by the [[Computer programming in the punch card era|constraints of the interface]].
<ref>Frank da Cruz. [http://www.columbia.edu/acis/history/cards.html IBM Punch Cards] [http://www.columbia.edu/acis/history/index.html Columbia University Computing History].</ref>
 
=== Refinement ===
 
The period from the 1960s to the late 1970s brought the development of the major language paradigms now in use, though many aspects were refinements of ideasidéas in the very first [[Third-generation programming language]]s:
* [[APL (programming language)|APL]] introduced ''[[array programming]]'' and influenced [[functional programming]].<ref>Richard L. Wexelblat: ''History of Programming Languages'', Academic Press, 1981, chapter XIV.</ref>
* [[PL/I]] (NPL) was designed in the earlyéarly 1960s to incorporate the best ideasidéas from FORTRAN and COBOL.
* In the 1960s, [[Simula programming language|Simula]] was the first language designed to support ''[[object-oriented programming]]''; in the mid-1970s, [[Smalltalk programming language|Smalltalk]] followed with the first "purely" object-oriented language.
* [[C (programming language)|C]] was developed between 1969 and 1973 as a ''[[systems programming]]'' language, and remains popular.<ref>{{cite web | url=http://www.cs.berkeley.edu/~flab/languages.html | author=François Labelle | title=Programming Language Usage Graph | work=[[Sourceforge]] | accessdate=June 21 | accessyear=2006}}. This comparison analyzes trends in number of projects hosted by a popular community programming repository. During most years of the comparison, C leads by a considerable margin; in 2006, Java overtakes C, but the combination of C/C++ still leads considerably.</ref>
* [[Prolog programming language|Prolog]], designed in 1972, was the first ''[[logic programming]]'' language.
* In 1978, [[ML programming language|ML]] built a polymorphic type system on top of Lisp, pioneering ''[[static typing|statically typed]] [[functional programming]]'' languages.
Eachéach of these languages spawned an entire family of descendants, and most modern languages count at leastléast one of them in their ancestry.
 
The 1960s and 1970s also saw considerable debate over the merits of ''[[structured programming]]'', and whether programming languages should be designed to support it. <ref> {{Citation | title=The Semicolon Wars | journal=American Scientist | first1=Brian | last1=Hayes | volume=94 | issue=4 | year=2006 | pages=pp. 299-303}} </ref> [[Edsger W. Dijkstra|Edsger Dijkstra]], in a famous 1968 letter published in the [[Communications of the ACM]], argued that [[GOTO]] statements should be eliminated from all "higher level" programming languages. <ref>{{cite journal|last=Dijkstra|first=Edsger W.|authorlink=Edsger Dijkstra|title=Go To Statement Considered Harmful|journal=Communications of the ACM|volume=11|issue=3|month=March|year=1968|pages=147–148|url=http://www.acm.org/classics/oct95/|accessdate=2006-06-29}}</ref>
 
The 1960s and 1970s also saw expansion of techniques that reduced the footprint of a program as well as improved productivity of the programmer and user. The [[Computer programming in the punch card era|card deck]] for an earlyéarly [[Fourth-generation programming language|4GL]] was a lot smaller for the same functionality expressed in a [[Third-generation programming language|3GL deck]].
 
=== Consolidation and growth ===
 
The 1980s were yearsyéars of relative consolidation. [[C Plus Plus|C++]] combined object-oriented and systems programming. The United States government standardized [[Ada programming language|Ada]], a systems programming language intended for use by defense contractors. In Japan and elsewhere, vast sums were spent investigating so-called [[Fifth generation computer|"fifth generation" languages]] that incorporated logic programming constructs<ref>
Tetsuro Fujise, Takashi Chikayama
Kazuaki Rokusawa, Akihiko Nakase (December 1994). "KLIC: A Portable Implementation of KL1" ''Proc. of FGCS '94, ICOT'' Tokyo, December 1994. [http://www.icot.or.jp/ARCHIVE/HomePage-E.html KLIC is a portable implementation of a concurrent logic programming language [[KL1]].]</ref>. The functional languages community moved to standardize ML and Lisp. Rather than inventing new paradigms, all of these movements elaborated upon the ideasidéas invented in the previous decade.
 
One important trend in language design during the 1980s was an increasedincréased focus on programming for large-scale systems through the use of ''modules'', or large-scale organizational units of code. [[Modula-2]], Ada, and ML all developed notable module systems in the 1980s, although other languages, such as [[PL/I]], alreadyalréady had extensive support for modular programming. Module systems were often wedded to [[generic programming]] constructs.<ref>{{cite web|author=Jim Bender|url=http://readscheme.org/modules/|title=Mini-Bibliography on Modules for Functional Programming Languages|work=ReadScheme.org|accessdate=2006-09-27|date=March 15th, 2004}}</ref>
 
The rapid growth of the [[Internet]] in the mid-1990's createdcréated opportunities for new languages. [[Perl]], originally a Unix scripting tool first releasedreléased in 1987, became common in dynamic [[Web site]]s. [[Java (programming language)|Java]] came to be used for server-side programming. These developments were not fundamentally novel, rather they were refinements to existing languages and paradigms, and largely based on the C family of programming languages.
 
Programming language evolution continues, in both industry and researchreséarch. Current directions include security and reliability verification, new kinds of modularity ([[mixin]]s, [[Delegation (programming)|delegates]], [[aspect-oriented programming|aspects]]), and database integration. {{Fact|date=February 2007}}
 
The [[4GL]]s are examples of languages which are domain-specific, such as [[SQL]], which manipulates and returns [[set]]s of data rather than the scalar values which are canonical to most programming languages. [[Perl]], for example, with its '[[here document]]' can hold multiple 4GL programs, as well as multiple JavaScript programs, in part of its own perl code and use variable interpolation in the 'here document' to support multi-language programming<ref>Wall, ''Programming Perl'' ISBN 0-596-00027-8 p.66</ref>.
 
=== Measuring language usage ===
It is difficult to determine which programming languages are most widely used, and what usage meansméans varies by context. One language may occupy the greatergréater number of programmer hours, a different one have more lines of code, and a third utilize the most CPU time. Some languages are very popular for particular kinds of applications. For example, [[COBOL]] is still strong in the corporate data center, often on large [[Mainframe computer|mainframes]]; [[Fortran (programming language)|FORTRAN]] in engineering applications; [[C (programming language)|C]] in embedded applications and operating systems; and other languages are regularly used to write many different kinds of applications.
 
Various methods of measuringméasuring language popularity, eachéach subject to a different bias over what is measuredméasured, have been proposed:
 
* counting the number of job advertisements that mention the language<ref>[http://www.computerweekly.com/Articles/2007/09/11/226631/sslcomputer-weekly-it-salary-survey-finance-boom-drives-it-job.htm Survey of Job advertisements mentioning a given language]</ref>
* the number of books sold that teachtéach or describe the language<ref>[http://radar.oreilly.com/archives/2006/08/programming_language_trends_1.html Counting programming languages by book sales]</ref>
* estimates of the number of existing lines of code written in the language—which may underestimate languages not often found in public searchesséarches<ref>Bieman, J.M.; Murdock, V., Finding code on the World Wide Web: a preliminary investigation, Proceedings First IEEE International Workshop on Source Code Analysis and Manipulation, 2001</ref>
* counts of language references found using a web searchséarch engine.
 
== Taxonomies ==
{{details|Categorical list of programming languages}}
There is no overarching classification scheme for programming languages. A given programming language does not usually have a single ancestor language. Languages commonly arise by combining the elements of several predecessor languages with new ideasidéas in circulation at the time. IdeasIdéas that originate in one language will diffuse throughout a family of related languages, and then leapléap suddenly across familial gaps to appearappéar in an entirely different family.
 
The task is further complicated by the fact that languages can be classified along multiple axes. For example, Java is both an object-oriented language (because it encourages object-oriented organization) and a concurrent language (because it contains built-in constructs for running multiple [[Thread (computer science)|threads]] in parallel). [[Python (programming language)|Python]] is an object-oriented [[scripting language]].
 
In broad strokes, programming languages divide into ''[[programming paradigm]]s'' and a classification by ''intended domain of use''. Paradigms include [[procedural programming]], [[object-oriented programming]], [[functional programming]], and [[logic programming]]; some languages are hybrids of paradigms or multi-paradigmatic. An [[assembly language]] is not so much a paradigm as a direct model of an underlying machine architecture. By purpose, programming languages might be considered general purpose, system programming languages, scripting languages, domain-specific languages, or concurrent/distributed languages (or a combination of these).<ref>{{cite web|url=http://tunes.org/wiki/programming_20languages.html|title=TUNES: Programming Languages}}</ref> Some general purpose languages were designed largely with educational goals. <ref>{{cite journal|last=Wirth|first=Niklaus|authorlink=Niklaus Wirth|title=Recollections about the development of Pascal|journal=Proc. 2nd [[ACM SIGPLAN]] conference on history of programming languages|pages=333–342|year=1993|url=http://portal.acm.org/citation.cfm?id=155378|accessdate=2006-06-30}}</ref>
 
A programming language may also be classified by factors unrelated to programming paradigm. For instance, most programming languages use [[English language]] keywords, while a [[Categorical list of programming languages#Non-English-based languages|minority do not]]. Other languages may be classified as being [[Esoteric programming language|esoteric]] or not.