First generation programming language
A first-generation programming language (1GL) is a machine-level programming language. Originally, no translator was used to compile or assemble the first-generation language. The first-generation programming instructions were entered through the front panel switches of the computer system. A first generation (programming) language (1GL) is a grouping of programming languages that are machine level languages used to program first-generation computers. The instructions were given through the front panel switches of these computers, directly to the CPU. There was originally no compiler or assembler to process the instructions in 1GL. The instructions in 1GL are made of binary numbers, represented by 1s and 0s. This makes the language suitable for the understanding of the machine but very much more difficult to interpret and learn by the human programmer. The main advantage of programming in 1GL is that the code can run very fast and very efficiently, precisely because the instructions are executed directly by the CPU. One of the main disadvantages of programming in a low level language is that when an error occurs, the code is not as easy to fix. 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 day programmers still occasionally use machine level code, especially when programming lower level functions of the system, such as drivers, interfaces with firmware and hardware devices. Modern tools, such as native-code compilers are used to produce machine level from a higher-level language.
Second generation programming language
A second generation (programming) language (2GL) is a grouping of programming languages associated with assembly languages. Unlike the first generation languages, programs can be written symbolically, using English words (also known as mnemonics), in a way that a human can understand and are subsequently converted into machine language by an assembler. Assembly languages are specific to computer and CPU. The term is used in the distinction between Machine Languages (1GL) and higher-level programming languages (3GL, 4GL, etc.) Assembly Languages originated in the 1940s, and are attributed to the efforts of the American naval officer Grace Hopper, with the introduction of the FLOW-MATIC language for the ENIAC computer. 2GL are mostly used for the implementation of low-level kernels and drivers and for performance-oriented and processing-intensive applications such as computer games, graphic manipulation applications and video editing applications. The symbolic representation of machine Instructions, registers and memory addresses allows the programmer to produce a human-readable program. For the computer to understand the program it must be converted to a machine readable format using an Assembler. The Assembler usually converts the Mnemonics via a one-to-one mapping from the mnemonic representation to machine language, for a particular processor family and environment. Assemblers allow for easier debugging of the program, and also introduce more advanced programming mechanisms such as macro Programming and structured Programming.
Third generation programming language
A third-generation programming language (3GL) is a generational way to categorize high-level computer programming languages. Where assembly languages, categorized as second generation programming languages, are machine-dependent, 3GLs are much more machine independent 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 feature more abstraction that 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 early examples of this sort of language. Most popular general-purpose languages today, such as C, C++, C#, Java, BASIC and Pascal, are also third-generation languages, although C++, Java and C# follow a completely different path as they are object-oriented in nature. Third generation focused on structure and had no meaning for the object oriented concepts. Most 3GLs support structured programming. A programming language such as C, FORTRAN, or Pascal enables a programmer to write programs that are more or less independent from a particular type of computer. Such languages are considered high-level because they are closer to human languages and further from machine languages. In contrast, assembly languages are considered low-level because they are very close to machine languages. 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 interpreter. The first high-level programming languages were designed in the 1950s. Examples of early high level languages are ALGOL, COBOL, and FORTRAN. These programs could run on different machines 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.
Forth generation programming language
A fourth-generation programming language (1970s-1990) (abbreviated 4GL) is a programming language or programming environment designed with a specific purpose in mind, such as the development of commercial business software. In the history of computer science, the 4GL followed the 3GL in an upward trend toward higher abstraction and statement power. The 4GL was followed by efforts to define and use a 5GL.
The natural-language, block-structured mode of the third-generation programming languages improved the process of software development. However, 3GL development methods can be slow and error-prone. It became clear that some applications could be developed more rapidly by adding a higher-level programming language and methodology which would generate the equivalent of very complicated 3GL instructions with fewer errors. In some senses, software engineering arose to handle 3GL development. 4GL and 5GL projects are more oriented toward problem solving and systems engineering.[citation needed]
All 4GLs are designed to reduce programming effort, the time it takes to develop software, and the cost of software development. They are not always successful in this task, sometimes resulting in inelegant and unmaintainable code. However, given the right problem, the use of an appropriate 4GL can be spectacularly successful as was seen with MARK-IV and MAPPER (see History Section, Santa Fe real-time tracking of their freight cars – the productivity gains were estimated to be 8 times over COBOL). The usability improvements obtained by some 4GLs (and their environment) allowed better exploration for heuristic solutions than did the 3GL.
The natural-language, block-structured mode of the third-generation programming languages improved the process of software development. However, 3GL development methods can be slow and error-prone. It became clear that some applications could be developed more rapidly by adding a higher-level programming language and methodology which would generate the equivalent of very complicated 3GL instructions with fewer errors. In some senses, software engineering arose to handle 3GL development. 4GL and 5GL projects are more oriented toward problem solving and systems engineering.[citation needed]
All 4GLs are designed to reduce programming effort, the time it takes to develop software, and the cost of software development. They are not always successful in this task, sometimes resulting in inelegant and unmaintainable code. However, given the right problem, the use of an appropriate 4GL can be spectacularly successful as was seen with MARK-IV and MAPPER (see History Section, Santa Fe real-time tracking of their freight cars – the productivity gains were estimated to be 8 times over COBOL). The usability improvements obtained by some 4GLs (and their environment) allowed better exploration for heuristic solutions than did the 3GL.
Fifth generation programming language
A fifth generation (programming) language (5GL) is a grouping of programming languages build on the premise that a problem can be solved, and an application built to solve it, by providing constraints to the program (constraint-based programming), rather than specifying algorithmically how the problem is to be solved (imperative programming).
In essence, the programming language is used to denote the properties, or logic, of a solution, rather than how it is reached. Most constraint-based and logic programming languages are 5GLs. A common misconception about 5GLs pertains to the practice of some 4GL vendors to denote their products as 5GLs, when in essence the products are evolved and enhanced 4GL tools.
The leap beyond 4GLs is sought by taking a different approach to the computational challenge of solving problems. When the programmer dictates how the solution should look, by specifying conditions and constraints in a logical manner, the computer is then free to search for a suitable solution. Most of the applicable problems solved by this approach can currently be found in the domain of artificial intelligence.
Considerable research has been invested in the 1980s and 1990s, into the development of 5GLs. As larger programs were built, it became apparent that the approach of finding an algorithm given a problem description, logical instructions and a set of constraint is a very hard problem in itself. During the 1990s, the wave of hype that preceded the popularization of 5GLs and predictions that they will replace most other programming languages, gave way to a more sober realization.
PROLOG (acronym for PROgramming LOGic) is an example of a Logical Programming Language. It uses a form of mathematical logic (predicate calculus) to solve queries on a programmer-given database of facts and rules.
In essence, the programming language is used to denote the properties, or logic, of a solution, rather than how it is reached. Most constraint-based and logic programming languages are 5GLs. A common misconception about 5GLs pertains to the practice of some 4GL vendors to denote their products as 5GLs, when in essence the products are evolved and enhanced 4GL tools.
The leap beyond 4GLs is sought by taking a different approach to the computational challenge of solving problems. When the programmer dictates how the solution should look, by specifying conditions and constraints in a logical manner, the computer is then free to search for a suitable solution. Most of the applicable problems solved by this approach can currently be found in the domain of artificial intelligence.
Considerable research has been invested in the 1980s and 1990s, into the development of 5GLs. As larger programs were built, it became apparent that the approach of finding an algorithm given a problem description, logical instructions and a set of constraint is a very hard problem in itself. During the 1990s, the wave of hype that preceded the popularization of 5GLs and predictions that they will replace most other programming languages, gave way to a more sober realization.
PROLOG (acronym for PROgramming LOGic) is an example of a Logical Programming Language. It uses a form of mathematical logic (predicate calculus) to solve queries on a programmer-given database of facts and rules.