Types of Programming Language

Following are the types of programming language:

Low-level Language
The low-level language is a programming language that provides no abstraction from the hardware and it is represented in 0 or 1 forms, which are the machine instructions.
Types of low-level language are:
• Machine language or First-generation language,
• Assembly language or Second-generation language.

Machine language
Machine language is the collection of binary numbers(i.e., 0s and 1s). It is the only language that is understood by the computer.
Advantages:

  • It is directly understood by the computer.
  • The execution speed is faster.
  • The use of hardware components like memory, the processor is efficient.
  • A language translator is not required.

Disadvantages:

  • It is tedious, difficult and time consuming to develop and debug programs.
  • All operation codes have to be remembered.
  • All memory address has to be remembered.
  • It is a machine-dependent language, so the program developed for one system may not work on another.

Assembly language
Assembly language is a language written in simple English language, so it is easily understandable by the users.
Advantages:

  • The execution speed is faster than high level language.
  • It is easier to develop and debug compared to machine language due to the use of mnemonics code.
  • Programmers does not need to know the exact storage location of data and instruction.

Disadvantages:

  • It needs to be translated into a machine language code.
  • It is also a machine dependent language.
  • Still, it is tedious to debug program.

High-Level Language
High-level languages are languages that use instruction that is closer to English and mathematical form. High-level languages are problem-oriented and easier to use because:
• They follow a set of rules called syntax, which makes it easier to use.
• They are machine-independent.
Three examples of high-level language are:
• FORTRAN
• PROLOG
• MERCURY

Types of High-level language are:
• Procedural-oriented language(3GL)
• Problem-oriented language(4GL)
• Natural language(5GL)

Procedural-oriented language(3GL)
This language uses simple English and mathematical statements to solve various problems. It includes the languages like BASIC, C, C++, etc.
Advantages:

  • It is easier to develop and debug program.
  • More advanced and user-friendly.
  • It is machine independent language.

Disadvantages:

  • It needs to be translated into a machine language code.
  • Program execution will be slower than 1GL AND 2GL.
  • It is difficult to develop hardware oriented software.

Problem-oriented Language(4GL)
This language allows the users to specify what the output should be, without describing all the details of how the data should be manipulated to produce the result.
Advantages:

  • It is even easier to develop and debug a program than a procedure-oriented language.
  • More advanced and user friendly software can be developed.
  • It is also machine independent language.

Disadvantages:

  • It needs to be translated into a machine language code.
  • Program execution will be even slower than the predecessors.
  • It is difficult to develop hardware oriented software.

Natural Language(5GL)
Fifth generation language allows people to interact with computers without needing any specialized knowledge. People can talk to computers and the voice recognition systems can convert spoken sounds into written words.
Advantages:

  • It will be even easier to develop and debug the program.
  • The programs designed using 5GL will have artifical intelligence(AI).

Disadvantages:

  • It is slower than previous generation languages.
  • Highly advanced and expensive electronic devices are required to run programs developed in 5GL. Therefore, it is an expensive apporach.

Differences between 4GL and 5GL
The Differences between 4GL and 5GL are:

4GL 5GL
1. Programmers of 4GL have to specify the algorithm in order to solve a problem. 1. programmers of 5GL only have to define the problem and constraints that need to be satisfied.
2. Program designed with 4GL doesn’t have artificial intelligence. 2. Programs designed with 5GL have artificial intelligence.