Tuesday 3 March 2015

Programming Languages


Programming languages were invented to make programming easier. They became popular because they are much easier to handle than machine language. Programming languages are designed to be both high-level and general purpose. A language is high-level if it is independent of the underlying hardware of a computer. It is general purpose if it can be applied to a wide range of situations. There are more than two thousand programming languages and some of these languages are general purpose while others are suitable for specific classes of applications. Languages such as C, C++, Java, C# and Visual Basic can be used to develop a variety of applications. On the other hand FORTRAN was initially developed for numerical computing, Lisp for artificial intelligence, Simula for simulation and Prolog for natural language processing (yet, these languages are general enough to be used for a wide range of problems.


As microprocessors, programming languages also can be grouped into several generations and currently we are in the fourth generation. In the early days, computers were programmed using machine language instructions that the hardware understood directly. Programs written using machine language belongs to the first generation of programming languages. These programs were hardly human readable, therefore understanding and modifying them was a difficult task. Later programs were written in a human readable version of machine code called Assembly language.

Assembly language belongs to the second generation of programming languages. Each Assembly language instruction directly maps into a machine language instruction (there is a 1-to-1 mapping). Assembly language programs were automatically translated into machine language by a program called an assembler. Writing and understanding Assembly language programs were easier than machine language programs. However even the Assembly language programs tend to be lengthier and tedious to write. Programs developed in Assembly runs only on a specific type of computer. Further, programmers were required to have a sound knowledge about computer organization4. With the introduction of third generation (also referred as 3GL) high-level languages were introduced. These languages allowed programmers to ig nore the details of the hardware. The programs written using those languages were portable 5 to more than one type of hardware. A compiler or an interpreter was used to translate the high-level code to machine code. Languages such as FORTRAN, COBOL, C and Pascal belong to the third generation.


All the modern languages such as Visual Basic, VB Script, Java, C# and MatLab belong to the fourth generation (4GL). Programs written in these languages were more readable and understandable than the 3GL. They are much closer to natural languages. Source code of the programs written in these languages is much smaller than other generation of languages (i.e. a single high level language instruction maps into multiple machine language instructions). However, programs developed in 4GL generally do not utilize resources optimally. They consume large amount of processing power and memory and they are generally slower than the programs developed using languages belonging to other generations. Most of these 4GL support development of Graphical User Interfaces (GUIs) and responding to events such as movement of the mouse, clicking of mouse or pressing a key on the keyboard.

Some people think that fifth generation languages are likely to be close to natural languages. Such languages are one of the major research areas in the filed of Artificial Intelligence.

No comments:

Post a Comment