# Programming language generations

> Mediated Wiki article. Canonical URL: https://mediated.wiki/source/Programming_language_generations
> Markdown URL: https://mediated.wiki/source/Programming_language_generations.md
> Source: https://en.wikipedia.org/wiki/Programming_language_generations
> Source revision: 1355990821
> License: Creative Commons Attribution-ShareAlike 4.0 International (https://creativecommons.org/licenses/by-sa/4.0/)

{{Short description|Concept in Computer Science}}
{{For|programming languages grouped by ancestor language|Generational list of programming languages}}
{{More references|date=November 2015}}
[Programming language](/source/Programming_language)s have been classified into several '''programming language generations'''.<ref>{{Cite web |date=2017-10-22 |title=Generation of Programming Languages |url=https://www.geeksforgeeks.org/generation-programming-languages/ |access-date=2025-01-15 |website=GeeksforGeeks |language=en-US}}</ref> 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.

==Generations==
===First generation (1GL)===
{{main|First-generation programming language}}

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.

===Second generation (2GL)===
{{main|Second-generation programming language}}

'''Examples:''' [assembly language](/source/assembly_language)s

Second-generation programming language (2GL) is a generational way to categorize [assembly language](/source/assembly_language)s.<ref name="Computer Hope">[http://www.computerhope.com/jargon/num/1gl.htm "Computer Hope, Generation languages"].</ref><ref name="Brookshear">{{cite book |last1=Brookshear |first1=J. Glenn |title=Computer science : an overview |date=2012 |publisher=Addison-Wesley |isbn=978-0-13-256903-3 |pages=240–241 |edition=11th}}</ref><ref name=":0">{{Cite web |url=http://www.uni-miskolc.hu/~geofiz/Oktatok/vass/Generations_and_paradigms.pdf |title=Programming Language generations and Programming Paradigms |last=Vass |first=Péter |date= |website= |archive-url=https://web.archive.org/web/20200129065933/http://www.uni-miskolc.hu/~geofiz/Oktatok/vass/Generations_and_paradigms.pdf |archive-date=2020-01-29 |access-date= |url-status=dead}}</ref>

===Third generation (3GL)===
{{main|Third-generation programming language}}

'''Examples:''' [C](/source/C_(programming_language)), [C++](/source/C%2B%2B), [Java](/source/Java_(programming_language)), [Python](/source/Python_(programming_language)), [PHP](/source/PHP), [Perl](/source/Perl), [C#](/source/C_Sharp_(programming_language)), [BASIC](/source/BASIC), [Pascal](/source/Pascal_(programming_language)), [Fortran](/source/Fortran), [ALGOL](/source/ALGOL), [COBOL](/source/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](/source/Fortran), [ALGOL](/source/ALGOL), and [COBOL](/source/COBOL) are examples of early 3GLs.

Most popular general-purpose languages today, such as [C](/source/C_(programming_language)), [C++](/source/C%2B%2B), [C#](/source/C_Sharp_(programming_language)), [Java](/source/Java_(programming_language)), and [BASIC](/source/BASIC), are also third-generation languages, although each of these languages can be further subdivided into other categories based on other contemporary traits. Most 3GLs support [structured programming](/source/structured_programming). Many support [object-oriented programming](/source/object-oriented_programming). Traits like these are more often used to describe a language rather than just being a 3GL.

===Fourth generation (4GL)===
{{main|Fourth-generation programming language}}

'''Examples:''' [ABAP](/source/ABAP), [Unix shell](/source/Unix_shell), [SQL](/source/SQL), [PL/SQL](/source/PL%2FSQL), [Oracle Reports](/source/Oracle_Reports), [R](/source/R_(programming_language)), [Halide](/source/Halide_(programming_language))

Fourth-generation languages tend to be specialized toward very specific [programming domain](/source/programming_domain)s.<ref>35th Hawaii International Conference on System Sciences - 1002 [http://csdl.computer.org/comp/proceedings/hicss/2002/1435/09/14350279.pdf&ei=pgcWQ6CwKsKYYMfF9OAI Domain-Specific Languages for Software Engineering]. {{webarchive|url=https://web.archive.org/web/20110516121525/http://csdl.computer.org/comp/proceedings/hicss/2002/1435/09/14350279.pdf%26ei%3DpgcWQ6CwKsKYYMfF9OAI|date=May 16, 2011}}.</ref><ref>
{{cite web |url=http://homepages.cwi.nl/~arie/papers/dslbib/ |title=Domain-Specific Languages: An Annotated Bibliography |author=Arie van Deursen |author2=Paul Klint |year=1998 |url-status=dead |archiveurl=https://web.archive.org/web/20090202154259/http://homepages.cwi.nl/~arie/papers/dslbib/ |archivedate=2009-02-02 |accessdate=2009-03-15 |author3=Joost Visser}}</ref> 4GLs may include support for [database](/source/database) management, [report generation](/source/Report_generator), [mathematical optimization](/source/mathematical_optimization), [GUI development](/source/Graphical_user_interface_builder), or [web development](/source/web_development).

===Fifth generation (5GL)===
{{main|Fifth-generation programming language}}

'''Examples:''' [Prolog](/source/Prolog), [OPS5](/source/OPS5), [Mercury](/source/Mercury_(programming_language)), CVXGen,<ref>[https://www.nae.edu/164334/Autonomous-Precision-Landing-of-Space-Rockets NAE, The Bridge], Autonomous Precision Landing of Space Rockets, December 19, 2016, Author: Lars Blackmore.</ref><ref>[https://cvxgen.com/docs/index.html CVXGEN: Code Generation for Convex Optimization], cvxgen.com, December 4, 2013.</ref> [Geometry Expert](/source/Geometry_Expert)

A fifth-generation programming language (5GL) is any [programming language](/source/programming_language) based on problem-solving using constraints given to the program, rather than using an [algorithm](/source/algorithm) written by a programmer.<ref>{{cite book |editor1-last=Dong |editor1-first=Jielin |title=Network dictionary |date=2007 |publisher=Javvin Technologies, Inc. |location=Saratoga, Calif. |isbn=9781602670006 |page=195}}</ref> They may use [artificial intelligence](/source/artificial_intelligence) techniques to solve problems in this way. Most [constraint-based](/source/constraint_programming) and [logic programming](/source/logic_programming) languages and some other [declarative language](/source/declarative_language)s are fifth-generation languages.

While [fourth-generation programming language](/source/fourth-generation_programming_language)s 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 in [artificial intelligence](/source/artificial_intelligence) or AI research. [OPS5](/source/OPS5) and [Mercury](/source/Mercury_(programming_language)) are examples of fifth-generation languages,<ref name="Bala">E. Balagurusamy, ''Fundamentals of Computers'', Mcgraw Hill Education (India), 2009, {{ISBN|978-0070141605}}, p. 340.</ref> as is [ICAD](/source/ICAD_(software)), which was built upon [Lisp](/source/Lisp_(programming_language)). [KL-ONE](/source/KL-ONE) is an example of a related idea, a [frame language](/source/frame_language).

==History==
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 called [high-level programming language](/source/high-level_programming_language)s, discussed below, giving technical content to the second/third-generation distinction among high-level programming languages as well while retroactively renaming [machine code](/source/machine_code) languages as [first generation](/source/first-generation_programming_language), and [assembly language](/source/assembly_language)s as [second generation](/source/Second-generation_programming_language).

Initially, all programming languages at a higher level than assembly were termed "[third-generation](/source/Third-generation_programming_language)", but later on, the term "[fourth-generation](/source/Fourth-generation_programming_language)" was introduced to try to differentiate the (then) new [declarative languages](/source/Declarative_programming) (such as [Prolog](/source/Prolog) 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 as [Pascal](/source/Pascal_(programming_language)), [C](/source/C_(programming_language)), [ALGOL](/source/ALGOL), [Fortran](/source/Fortran), [BASIC](/source/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 as [object-oriented](/source/Object-oriented_programming), declarative and functional. [C](/source/C_(programming_language)) gave rise to [C++](/source/C%2B%2B) and later to [Java](/source/Java_(programming_language)) and [C#](/source/C_Sharp_(programming_language)); [Lisp](/source/Lisp_(programming_language)) to [CLOS](/source/Common_Lisp_Object_System); [Ada to Ada 2012](/source/Ada_(programming_language)); and even [COBOL to COBOL 2002](/source/COBOL). New languages have emerged in that "generation" as well.

==See also==
* [List of AI-assisted software development tools](/source/List_of_AI-assisted_software_development_tools)
* [Timeline of programming languages](/source/Timeline_of_programming_languages)

==References==
{{reflist}}

{{Programming language generations}}

{{Computer language}}

Category:Programming language classification

---
Adapted from the Wikipedia article [Programming language generations](https://en.wikipedia.org/wiki/Programming_language_generations) by Wikipedia contributors ([contributor history](https://en.wikipedia.org/wiki/Programming_language_generations?action=history)). Available under [Creative Commons Attribution-ShareAlike 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/). Changes may have been made.
