This articleneeds additional citations forverification. Please helpimprove this article byadding citations to reliable sources. Unsourced material may be challenged and removed. Find sources: "Programming language generations" – news ·newspapers ·books ·scholar ·JSTOR(November 2015) (Learn how and when to remove this message) |
Programming languages have been classified into severalprogramming language generations.[1] Historically, this classification was used to indicate increasing power of programming styles. Later writers have somewhat redefined the meanings as distinctions previously seen as important became less significant to current practice.
A first-generation programming language (1GL) is a machine-level programming language. These are the languages that can be directly executed by a central processing unit (CPU). The instructions in 1GL are expressed in binary, represented as 1s and 0s (or occasionally via octal or hexadecimal to the programmer). This makes the language suitable for execution by the machine but far more difficult for human programmer to learn and interpret. First-generation programming languages are rarely used by programmers in the twenty-first century, but they were universally used to program early computers, before assembly languages were invented and when computer time was too scarce to be spent running an assembler.
Examples:assembly languages
Second-generation programming language (2GL) is a generational way to categorizeassembly languages.[2][3][4]
Examples:C,C++,Java,Python,PHP,Perl,C#,BASIC,Pascal,Fortran,ALGOL,COBOL
3GLs are much more machine-independent (portable) and more programmer-friendly. This includes features like improved support for aggregate data types and expressing concepts in a way that favors the programmer, not the computer. A third-generation language improves over a second-generation language by having the computer take care of non-essential details. 3GLs are more abstract than previous generations of languages, and thus can be considered higher-level languages than their first- and second-generation counterparts. First introduced in the late 1950s,Fortran,ALGOL, andCOBOL are examples of early 3GLs.
Most popular general-purpose languages today, such asC,C++,C#,Java, andBASIC, are also third-generation languages, although each of these languages can be further subdivided into other categories based on other contemporary traits. Most 3GLs supportstructured programming. Many supportobject-oriented programming. Traits like these are more often used to describe a language rather than just being a 3GL.
Examples:ABAP,Unix shell,SQL,PL/SQL,Oracle Reports,R,Halide
Fourth-generation languages tend to be specialized toward very specificprogramming domains.[5][6] 4GLs may include support fordatabase management,report generation,mathematical optimization,GUI development, orweb development.
Examples:Prolog,OPS5,Mercury, CVXGen,[7][8]Geometry Expert
A fifth-generation programming language (5GL) is anyprogramming language based on problem-solving using constraints given to the program, rather than using analgorithm written by a programmer.[9] They may useartificial intelligence techniques to solve problems in this way. Mostconstraint-based andlogic programming languages and some otherdeclarative languages are fifth-generation languages.
Whilefourth-generation programming languages are designed to build specific programs, fifth-generation languages are designed to make the computer solve a given problem without the programmer. This way, the user only needs to worry about what problems need to be solved and what conditions need to be met, without worrying about how to implement a routine or algorithm to solve them. Fifth-generation languages are used mainly inartificial intelligence or AI research.OPS5 andMercury are examples of fifth-generation languages,[10] as isICAD, which was built uponLisp.KL-ONE is an example of a related idea, aframe language.
The terms "first-generation" and "second-generation" programming language were not used prior to the coining of the term "third-generation"; none of these three terms are mentioned in early compendiums of programming languages. The introduction of a third generation of computer technology coincided with the creation of a new generation of programming languages. The marketing for this generational shift in machines correlated with several important changes in what were calledhigh-level programming languages, discussed below, giving technical content to the second/third-generation distinction among high-level programming languages as well while retroactively renamingmachine code languages asfirst generation, andassembly languages assecond generation.
Initially, all programming languages at a higher level than assembly were termed "third-generation", but later on, the term "fourth-generation" was introduced to try to differentiate the (then) newdeclarative languages (such asProlog and domain-specific languages) which claimed to operate at an even higher level, and in a domain even closer to the user (e.g. at a natural-language level) than the original, imperative high-level languages such asPascal,C,ALGOL,Fortran,BASIC, etc.
"Generational" classification of high-level languages (third generation and later) was never fully precise and was later perhaps abandoned, with more precise classifications gaining common usage, such asobject-oriented, declarative and functional.C gave rise toC++ and later toJava andC#;Lisp toCLOS;Ada to Ada 2012; and evenCOBOL to COBOL 2002. New languages have emerged in that "generation" as well.