Generation of Programming Language
Programming languages are classified into five generations depending upon the power and flexibility of programming styles.
First Generation
There was no strict demarcation between first and second generation languages in early days of its creation. In fact, the terms were not used until third generation programming language emerged. The first generation programming language consisted entirely of binary numbers which were entered through the front panel switches of the computer system; thus, they are appropriately named as machine level language. The main and perhaps the only benefit in writing machine level language is that the code written by the user does not require any translation and hence can run very fast and efficiently. This language is far more difficult to learn than other generational programming languages and it is equally difficult to trace errors, if any were to occur. Instructions (programs) are stored in memory locations sequentially and therefore entire code needs to be changed if insertion or deletion in the code needs to be made. Furthermore, this generation of programming language is significantly less portable than other generation of languages.
Second Generation
Assembly level languages are suitably included in second generation of programming language since their creation immediately followed the emergence of first generation programming language. The tedious coding consisting entirely of numbers is somewhat eliminated in this language, since certain mnemonics are used in place of numbers. However, translation is required to convert these mnemonics into machine code. Therefore, the coding process is slower than machine language. The language is specific to particular processor or family thus less portable than other higher generational languages. Although primitive, this language is still widely used to program microcontrollers, device drivers, etc.
Third Generation
As a refined version of second generation programming language, the third generation programming language emerged which brought a structured logic to the software, making programming more user friendly. The high level languages of this generation are more English-like in structure where each and every statement is taken from natural language. The codes written in this language need to be translated, which is done by a compiler or interpreter. Due to this translation process the codes run much slower. The codes are easier to edit and debug and are machine independent. A programmer does not require the hardware and details of the machine being programmed. Examples of 3GL are C, C++, C#, PASCAL, FORTRAN, JAVA, etc.
Fourth Generation
The fourth generation programming language is one step ahead of the third generation programming language. There are fewer options for the programmers, but the programs are much easier to write and debug than 3GLs. There built in GUI (Graphical user interfaces) objects like buttons, dropdown menus, add-ins, etc. and no separate code needs to be written for them. These languages are particularly developed with the viewpoint of solving a particular class of problem. Given the right kind of problem, the use of an appropriate 4GL can be spectacularly successful. All 4GLs are designed to reduce programming effort, the time it takes to develop software, and the cost of software development. Compilers and interpreters are still needed to convert it into machine code. Thus a single line code in this language is equivalent to more lines of coding in lower level language. Therefore, the programs generated using these languages are larger and much slower. For e.g. SQL, ORACLE, MATLAB, ColdFusion, CSS etc.
Fifth Generation
The fifth generation programming language uses human’s natural language as program source code. It is designed to make the computer solve the problem without the programmer. 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. Human languages by nature are full of ambiguity. A single statement in natural language is intended to provide a particular meaning can serve to present an entirely new meaning altogether. But this ambiguity cannot be handled by a computer which requires specific and well defined instructions. Therefore, the use of 5GL has not become a reality yet and is still in the research phase. 5GLs are mostly used in artificial intelligence research. Prolog, OPS5, Mercury, etc. are examples of fifth generation languages.