Programming languages have been classified into several programming language generations. This series of buzzwords was popular in the 1980s and 1990s. 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.
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. As early as May 1966 computers were advertised as third generation computers. This buzzword was reused to advertise programming languages as third generation languages within the same year. It is synonymous to the buzzword high-level programming language which was coined 1964 or a bit earlier. In 1957 Bob Bemer still called programming with a high-level language “automatic programming”. Machine code languages were retroactively named first generation and assembly languages second generation languages.
Niklaus Wirth, who designed Pascal, wrote in 2008 that high-level language was “a poorly understood buzzword” and contrasted C with high-level programming languages.
Around 1973 fourth-generation language was coined. It was used for declarative languages (such as Prolog), “database languages” 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, C, ALGOL, Fortran, BASIC, etc.
Also around 1973 very high level language (VHLL) was coined. It remained rarely used and is about as vague as 5GL. The only consistent thing about it is that it is supposed to be higher-level than high-level language. In 1974 English was called a VHLL. One paper from 1974 says VHLL are supposed to be nonprocedural (declarative) languages. In 1983 a paper calls the procedural languages APL, SETL and BDL VHLLs. In the 90s it was sometimes used to refer to scripting languages like Perl and Python.
"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 domain-specific, object-oriented, declarative and functional. C gave rise to C++ and later to Java and C#; Lisp to CLOS; Ada to Ada 2012; and even COBOL to COBOL 2002. New languages have emerged in that "generation" as well.
In 1988 in the German computer magazine Computerwoche Jürgen Dyrda, Managing Director of Progress Software GmbH, said that the discussion of 5GL is absurd. The article further claims that a few years prior 4GL disputed too and that at the time anyone who wants to be taken seriously in the market included the term "4GL" either before or after the product name of his database software.
In 2017 Computerwoche wrote that 4GL is a “a rather vague term that was primarily used for marketing purposes in the 1980s” and that 5GL is “even more vague. But has something to do with artificial intelligence”.
In the September 1994 issue of the Scientific American Bill Curtis says in an interview with W. Wayt Gibbs, “In the 1970s structured programming was also touted as a paradigm shift. So was CASE [computer-assisted software engineering]. So were third-, fourth- and fifth-generation languages. We’ve heard great promises for technology, many of which weren’t delivered.”
Generations
First generation (1GL)
A first-generation programming language (1GL) is a machine-level programming language and belongs to the low-level programming languages.
These are the languages that can be directly executed by a central processing unit (CPU). This makes the language suitable for execution by the machine but far more difficult for a 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.
It is also known as machine language. Originally, no translator was used to compile or assemble a first-generation language. The first-generation programming instructions were entered through the front panel switches of the computer system.
The instructions in a 1GL are made of binary numbers, represented by 1s and 0s (or occasionally via octal or hexadecimal to the programmer). This makes the language suitable for the understanding of the machine but far more difficult to interpret and learn by the human programmer.
First-generation languages are very much adapted to a specific computer and CPU, and code portability is therefore significantly reduced in comparison to higher-level languages. Modern tools such as native-code compilers are used to produce machine-level code from a higher-level language.
Second generation (2GL)
Second-generation programming language (2GL) is a generational way to categorize assembly languages."Computer Hope, Generation languages" They belong to the low-level programming languages.
The term was coined to provide a distinction from higher level machine independent third-generation programming languages (3GLs) (such as COBOL, C, or Java) and earlier first-generation programming languages (machine code)
Second-generation programming languages have the following properties: Lines within a program correspond directly to processor commands, essentially acting as a mnemonic device overlaying a first generation programming language. The code can be read and written by a programmer. To run on a computer it must be converted into a machine readable form, a process called assembly. The language is specific to a particular processor family and environment.
Second-generation languages are sometimes used for parts of kernels or device drivers, and are sometimes used in video games, graphics programs, and other intensive programs.
In modern programs, second generation assembly languages are rarely used. Programming in second generation languages may yield speed benefits, but several disadvantages have led to its decline:
Programming is expressed in terms of individual processor instructions, rather than higher level logic. Low-level memory and hardware details must be manually managed which is often bug-prone. Programs are machine-dependent, so different versions must be written for every target machine architecture.
The vast majority of programs are written in a third-generation programming language or a fourth-generation programming language. Assembly's main advantage, speed, has degraded by the fact that well written C code can often be as fast or even faster than handwritten assembly.
Second generation languages are perhaps most significant in their place in computing history. For a long time, Second generation assembly languages were the only good option for development for many machines, such as the NES or the Commodore 64. Second generation languages represented a massive step away from the tradition of programmers conforming to the needs of a machine, and the first step towards the machine accommodating for the programmer, a phenomenon that would be repeated in all subsequent programming language generations.
Third generation (3GL)
Examples: C, C++, Java, Python, JavaScript, PHP, Perl, C#, BASIC, Pascal, Fortran, ALGOL, COBOL
A third-generation programming language (3GL) is a high-level programming language. They are much more machine-independent (portable) and more programmer-friendly than the machine code and assembly languages, while having a less specific focus to the fourth and fifth generations. 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, and COBOL are examples of early 3GLs.
Most popular general-purpose languages today 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. Many support object-oriented programming. Traits like these are more often used to describe a language rather than just being a 3GL.
The main advantage of high-level languages over low-level languages is that they are easier to read, write, and maintain. Ultimately, programs written in a high-level language must be translated into machine language by a compiler or directly into behaviour by an interpreter.
These programs could run on different machines (they are portable) so they were machine-independent. As new, more abstract languages have been developed, however, the concept of high- and low-level languages have become rather relative. Many of the early "high-level" languages are now considered relatively low-level in comparison to languages such as Python, Ruby, and Common Lisp, which have some features of fourth-generation programming languages and were called very high-level programming languages in the 1990s.Tom Christiansen et al (eds.): USENIX 1994 Very High Level Languages Symposium Proceedings. October 26-28, 1994, Santa Fe, New Mexico
Fourth generation (4GL)
Examples: ABAP, Unix shell, SQL, PL/SQL, Oracle Reports, R, Halide
Fourth-generation languages are most often domains-specific languages.35th Hawaii International Conference on System Sciences - 1002 Domain-Specific Languages for Software Engineering. . 4GLs may include support for database management, report generation, mathematical optimization, GUI development, or web development.
The definition of 4GL has changed over time but it can be typified by operating more with large collections of information at once. Languages claimed to be 4GL may include support for database management, report generation, mathematical optimization, graphical user interface (GUI) development, or web development. Some researchers state that 4GLs are a subset of domain-specific languages.35th Hawaii International Conference on System Sciences - 1002 Domain-Specific Languages for Software Engineering
The concept of 4GL was developed from the 1970s through the 1990s, overlapping most of the development of 3GL, with 4GLs identified as "non-procedural" or "program-generating" languages, contrasted with 3GLs being algorithmic or procedural languages. 4GLs as originally defined found uses focused on databases, reports, and websites. Some advanced 3GLs like Python, Ruby, and Perl combine some 4GL abilities within a general-purpose 3GL environment, and libraries with 4GL-like features have been developed as add-ons for most popular 3GLs, producing languages that are a mix of 3GL and 4GL, blurring the distinction.
History
Though used earlier in papers and discussions, the term 4GL was first used formally by James Martin in his 1981 book Application Development Without ProgrammersMartin, James. Application Development Without Programmers. Prentice-Hall, 1981. . to refer to non-procedural, high-level specification languages. In some primitive way, early 4GLs were included in the Informatics MARK-IV (1967) product and Sperry's MAPPER (1969 internal use, 1979 release).
The term can apply to a large set of software products. It can also apply to an approach that looks for greater semantic properties and implementation power. Just as the 3GL offered greater power to the programmer, so too did the 4GL open up the development environment to a wider population.