Check The Programming Section
The development of programming languages has gone through several phases of programming language generations. Historically this distinction has been used to demonstrate the rising influence of programming types. The meanings were somewhat redefined by later writers as distinctions previously perceived as important became less significant in the current practice.
Machine language is the only language that a machine understands and this type of language also termed as low-level language. In machine language all the instructions are written in the form of 0s and 1s, corresponding to the off and on state of an electrical single. Each machine code is a computer program written in machine language instruction and these machine codes are directly executed by the CPU of the computer.
Each machine code, instructs the CPU to perform some specific task, such as a load, a store, a jump, or an arithmetic logic unit (ALU) operation on one or more units of data in the CPU's registers or memory. All machine language programs typically displayed with the binary numbers represented in octal or hexadecimal number systems. This type of instructions are not understood by a human and this is the reason it is also called a low level programming language.
The main advantage of this language is machine codes are executed very fast and efficient, because codes are directly executed by the CPU. The main problem with the machine language is, it is very hard to learn and difficult to correct the errors.
Another drawback of such language is, codes are not portable. Once a code is written and executed, they are written for particular machine architecture.
Assembly level languages are considered as second generation programming languages. In computer programming, assembly language (or assembler language), often abbreviated as asm, is any low-level programming language in which there is a very strong connection between the instructions of the assembly language and the architecture's machine code instructions. An assembly depends on the machine code instructions and every assembler has its own assembly language which is designed for exactly one specific computer architecture. Assembly language is also called symbolic machine code.
The first assembly language developed in 1950, uses the symbolic codes also known as mnemonic codes. An assembly language is comparatively easy with respect to first generation machine codes. Because, assembly codes are like abbreviations and easy to remember, rather than numbers. Some examples of assembly codes include ADD for addition of two numbers, CMP for comparison, and MUL for multiply.
The code written in assembly language will be very efficient in terms of execution time and main memory usage. Programs written in assembly language require a translator, often known as the assembler, to convert them into machine language.
This language is comparatively easy to understand, correct the errors and easy to modify. It has disadvantages like, codes are machine dependent and thus not portable.To program with assembly language, a program must have good knowledge of internal machine architecture.
A CPU can only execute code which is written in 0s and 1s. Since the evaluation of the second generation assembly languages, we further need a translator called an assembler to translate an assembly language to machine language. If assembly code has errors, it will notify the programmer by generating a list of errors. After correction of all the errors, the assembly code translated to machine code which is also called object code.
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 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, such as C, C++, C#, Java, BASIC and Pascal, 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.
Some high level languages are designed to serve a specific purpose only, such as controlling the industrial robots and creating graphics. Most programmers prefer a general purpose high level language, such as BASIC, FORTRAN, Pascal, COBOL, and C++, or Java to write the code for their applications.
Languages like C or Fortran enable a programmer to write code using a language closer to a human-understandable form and this is the reason these languages are also termed as high-level languages. In contrast to this, 1st generation machine languages are called low-level language, because they were designed to be directly compiled by a machine.
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.
A compiler is a computer program that translates computer code written in one programming language (high-level language as source language) into another language (machine language or assembly language), considered as target language. A compiler is likely to perform many or all of the following operations: preprocessing, lexical analysis, parsing, semantic analysis (syntax-directed translation), conversion of input programs to an intermediate representation, code optimization and code generation.
Compilers implement these operations in phases that promote efficient design and correct transformations of source input to target output. Compilers are not the only language processor used to transform source programs, it is also an interpreter.
An interpreter is computer software that transforms and then executes the indicated operations. The translation process influences the design of computer languages which leads to a preference of compilation or interpretation. In practice, an interpreter can be implemented for compiled languages and compilers can be implemented for interpreted languages.
Compilers are not the only language processor used to transform source programs. An interpreter is computer software that transforms and then executes the indicated operations. The translation process influences the design of computer languages which leads to a preference of compilation or interpretation. In practice, an interpreter can be implemented for compiled languages and compilers can be implemented for interpreted languages.
A simpler version that writes its output directly to memory is called the loader, though loading is typically considered a separate process.
A fourth-generation programming language (4GL) is any computer programming language that belongs to a class of languages envisioned as an advancement upon third-generation programming languages (3GL). Each of the programming language generations aims to provide a higher level of abstraction of the internal computer hardware details, making the language more programmer-friendly, powerful, and versatile. While the definition of 4GL has changed over time, it can be typified by operating more with large collections of information at once rather than focusing on just bits and bytes. Languages claimed to be 4GL may include support for database management, report generation, mathematical optimization, GUI development, or web development. Some researchers state that 4GLs are a subset of domain-specific languages.
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. While 3GLs like C, C++, C#, Java, and JavaScript remain popular for a wide variety of uses, 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.
A fifth-generation programming language (5GL) is any programming language based on problem-solving using constraints given to the program, rather than using an algorithm written by a programmer.[1] Most constraint-based and logic programming languages and some other 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 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 research. OPS5 and Mercury are examples of fifth-generation languages. As is ICAD, which was built upon Lisp. KL-ONE is an example of a related idea, a frame language.
https://en.wikipedia.org/wiki/Programming_language_generations
https://en.wikipedia.org/wiki/Machine_code
https://en.wikipedia.org/wiki/Second-generation_programming_language
https://en.wikipedia.org/wiki/Third-generation_programming_language
https://en.wikipedia.org/wiki/Compiler
IBM OS Linkage Editor and Loader (PDF). IBM Corporation. 1972. Archived (PDF) from the original on 2020-03-06. Retrieved 2020-03-07.
Barron, David William (1978) [1971, 1969]. "5.7. Linkage editors and consolidators". Written at University of Southampton, Southampton, UK. In Floretin, J. John (ed.). Assemblers and Loaders. Computer Monographs (3 ed.). New York, USA: Elsevier North-Holland Inc. pp. 65–66. ISBN 0-444-19462-2. LCCN 78-19961. (xii+100 pages)
https://en.wikipedia.org/wiki/Fourth-generation_programming_language
Dong, Jielin, ed. (2007). Network dictionary. Saratoga, Calif.: Javvin Technologies, Inc. p. 195. ISBN 9781602670006.
E. Balagurusamy, Fundamentals of Computers, Mcgraw Hill Education (India), 2009, ISBN 978-0070141605, p. 340