11.5.1.1 distinguish between generations of programming languages
Generations of programming language
Programming languages have been developed over the year in a phased manner. Each phase of developed has made the programming language more user-friendly, easier to use and more powerful. Each phase of improved made in the development of the programming languages can be referred to as a generation. The programming language in terms of their performance reliability and robustness can be grouped into five different generations:
- First generation languages (1GL)
- Second generation languages (2GL)
- Third generation languages (3GL)
- Fourth generation languages (4GL)
- Fifth generation languages (5GL)
1. First Generation (1GL) - Machine Language:
- Consists of binary codes (0s and 1s).
- Directly executed by a computer without any translation.
- Highly hardware-specific; programmers needed to know the exact architecture and hardware details.
2. Second Generation (2GL) - Assembly Language:
- Uses mnemonic codes and symbolic addresses instead of binary.
- Requires an assembler to convert to machine code.
- Provides a bit more abstraction than machine language but is still closely tied to the machine architecture.
3. Third Generation (3GL) - High-Level Programming Languages:
- Abstracts machine details and allows developers to write more human-readable code.
- Includes languages like C, C++, Fortran, COBOL, Java, and Pascal.
- Requires compilers or interpreters to translate to machine code or bytecode.
- Introduces structured programming paradigms.
4. Fourth Generation (4GL) - Very High-Level Programming Languages:
- Further abstracts programming concepts and is often task-specific.
- Often used for database interaction, report generation, and some business applications.
- Examples include SQL (for database queries), MATLAB (for matrix and numerical calculations), and tools like Oracle Reports.
5. Fifth Generation (5GL) - Constraint-based or Logic Programming Languages:
- Focused on solving problems using constraints given instead of a specific algorithm.
- Prolog is an example of a 5GL, where solutions are derived from a set of facts and rules.
- Used primarily for artificial intelligence and knowledge-based applications.
While these classifications serve as a foundational understanding of the evolution of programming languages, the borders between these generations aren't always distinct. Over the decades, numerous languages and tools have been developed, each with its unique features and purposes. The trend has been moving towards more abstraction, ease of use, and flexibility in expressing complex logic and operations.
Questions:
- Explain the difference between 1GL and 2GL.
- Describe the advantage of 4GL over 3GL.
- Describe features of 5GL.
Exercises:
Ex. 1
Exam questions: |