First Generation Programming Language
A first-generation programming language 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.
The main benefit of programming in a first-generation programming language is that the code a user writes can run very fast and efficiently, since it is directly executed by the CPU. However, machine language is somewhat more difficult to learn than higher generational programming languages, and it is far more difficult to edit if errors occur. In addition, if instructions need to be added into memory at some location, then all the instructions after the insertion point need to be moved down to make room in memory to accommodate the new instructions. Doing so on a front panel with switches can be very difficult. Furthermore, portability is significantly reduced - in order to transfer code to a different computer it needs to be completely rewritten since the machine language for one computer could be significantly different from another computer. Architectural considerations make portability difficult too. For example, the number of registers on one CPU architecture could differ from those of another.
Second Generation Programming LanguageSecond-generation programming language is a generational way to categorize assembly languages. The term was coined to provide a distinction from higher level third-generation programming languages (3GL) such as COBOL and earlier machine code languages. 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.[1] This conversion process is a simple one-to-one mapping of the assembly language mnemonics into binary machine code consisting of opcodes and operands. The language is specific to a particular processor family and environment. Since it is a one-to-one mapping to the native language of the target processor it has significant speed advantages but requires more programming effort than 3GLs.[2]
Second-generation languages are sometimes used in kernels and device drivers (though C is generally employed for this in modern kernels), but more often find use in extremely intensive processing such as games, video editing, graphic manipulation/rendering, emulation/virtualization, simulation, encryption and compression.
Often, the "skeleton" of such programs is constructed in a higher-level language and individual functions are implemented in lower-level language. These functions typically exist at the core of the tightest loops, being executed many times per second. This assures the greatest gain from the painstaking hand optimization process, as every bit of time shaved off is multiplied.[citation needed]
One method for creating such code is by allowing a compiler to generate a machine-optimized assembly language version of a particular function. This code is then hand-tuned, gaining both the brute-force insight of the machine optimizing algorithm and the intuitive abilities of the human optimizer.
Third Generation Programming Language
A third-generation language (3GL) is a programming language designed to be easier for a human to understand, including things like named variables, abstract data types, and algebraic expression syntax. Another crucial difference compared to second-generation programming languages was abstraction away from the underlying processor. A fragment might be:
let b = c + 2 * d
First introduced in the late 1950s, Fortran, ALGOL and COBOL are early examples of this sort of language. Most "modern" languages (BASIC, C, C++, Delphi, and Java) are also third-generation languages. Most 3GLs support structured programming.
Fourth 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 evolution of computing, 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.
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.
A quantitative definition of 4GL has been set by Capers Jones, as part of his work on function point analysis. Jones defines the various generations of programming languages in terms of developer productivity, measured in function points per staff-month. A 4GL is defined as a language that supports 12 - 20 FP/SM. This correlates with about 16 - 27 lines of code per function point implemented in a 4GL.
Fourth-generation languages have often been compared to domain-specific programming languages (DSLs). Some researchers state that 4GLs are a sub-set of DSLs. [1] Given the persistence of assembly language even now in advanced development environments (MS Studio), one expects that a system ought to be a mixture of all the generations, with only very limited use of the first.
Fifth Generation Programming Language
A fifth-generation programming language (abbreviated 5GL) is a programming language based around solving problems using constraints given to the program, rather than using an algorithm written by a programmer. Most constraint-based and logic programming languages and some declarative languages are fifth-generation languages.
While fourth-generation programming languages are designed to build specific programs, fifth-generation languages are designed to make the computer solve the problem for you. This way, the programmer 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 research. Prolog, OPS5, and Mercury are the best known fifth-generation languages.
These types of languages were also built upon Lisp, many originating on the Lisp machine. ICAD is a good example. Then, there are many frame languages, such as KL-ONE.
In the 1990s, fifth-generation languages were considered to be the wave of the future, and some predicted that they would replace all other languages for system development, with the exception of low-level languages. Most notably, from 1982 to 1993 Japan [1] [2] put much research and money into their fifth generation computer systems project, hoping to design a massive computer network of machines using these tools.
However, as larger programs were built, the flaws of the approach became more apparent. It turns out that, starting from a set of constraints defining a particular problem, deriving an efficient algorithm to solve it is a very difficult problem in itself. This crucial step cannot yet be automated and still requires the insight of a human programmer.
Today, fifth-generation languages have lost part of their initial appeal and are mostly used in academic circles.