Programming languages are classified into general categories based on the ‘level’ at which they operate, and their relative complexity. In descending order from highest to lowest levels, those classifications are :
Generation | Description |
Fifth Generation (5GL) | – Designed to be the closest possible to natural human language – Intended for use with AI/expert systems – 5GL languages focus on problem-solving more than the actual coding, and primarily use constraint-based logic to define goals, rather than algorithms – Actual code is then created by the AI/expert system, to achieve the goals within specified constraints – EXAMPLES – LISP, PROLOG, Mercury |
Fourth Generation (4GL) | – While not as abstracted as fifth-generation languages, fourth generation languages are intended to simplify coding and make the syntax closer to actual language – While 4GL languages have simpler syntax and rules than some other languages, they do still require learning to code and algorithmic approaches to achieving goals and solving problems – 4GL languages are also often ‘optimized’ to work with databases. As an example, SQL is considered a fourth-generation language – EXAMPLES – Python, Perl, Visual Basic |
Third Generation (3GL) | – Also known as ‘high-level programming languages’ – 3GL languages are more readable than lower-level languages such as Assembly, but incorporate some more advanced concepts than higher-level fourth- and fifth-generation languages. Most 3GL languages support concepts such as aggregate data types and object-oriented programming – EXAMPLES – C/C++, Java, COBOL |
Second Generation (2GL) | – Second Generation languages (2GL) represent a middle ground between binary and compiled/interpreted code, allowing developers to use mnemonics to represent instructions, providing a semblance of natural language through the use of short codes for instructions – If you have ever heard of Assembler code before, this is where that codes ‘resides’ – 2GL languages are usually used for relatively low-level work, such as device drivers or other aspects of operating system activities – EXAMPLES – NASM, MASM |
First Generation (1GL) | – First-Generation Languages (1GL) represent binary coding, literally using 1’s and 0’s to send directions directly to the computer’s CPU without the need to compile/interpret the instructions. The CPU can take binary code directly – This makes binary coding highly effective and efficient from a runtime perspective because the code doesn’t need to go through any additional steps to run – However, binary code is hard to write and debug when needed, and the coding effort is typically quite long and labor-inensive – EXAMPLE – because we’re talking about binary coding, it’s really the only ‘example’ |