Programming Languages, Classification

Programming Languages, Classification : There are many different languages which can be used for computer programming. Generally, the programming languages can be divided into two categories i.e. low-level language and high-level language (HLL). In the first category, we have machine language and assembly language. In the H.L.L. category, we have FORTRAN, BASIC, PASCAL, COBOL etc. A single instruction in HLL can produce many machine instructions. This greatly simplifies the task of writing complete, correct program. Every HLL requires a compiler or interpreter to translate instructions in the HLL into low-level instructions that the computer can execute. This process is known as compilation or 8 Programming in C interpretation, depending upon how it is carried out. A compiler is similar to an assembler, but much more complex. Compilers translate the entire program into machine language before executing any of the instructions. Interpreters, on the other hand, proceed through a program by translating and then executing single instruction or small group of instructions. In either case, the translation is carried out automatically within the computer. It should be noted that compiler or interpreter is itself a computer program. It accepts a program written in a HLL as input and generates a corresponding machine language program as output. The original HLL program is called the source program and the resulting machine language program is called the object program. Every computer must have its own compiler or interpreter for a particular HLL. The farther a programming language is from a machine language, the more difficult it is for the compiler to perform its task. A HLL offers three significant advantages over machine language. These are readability (simplicity), portability (i.e. machine independence) and maintainability. Despite these advantages, the significant drawback of HLL is reduced efficiency. This is due to the fact that when a compiler translates programs into machine language, it may not translate them into the most efficient machine code. Nevertheless, HLL are superior to machine and assembly languages in most instances. Also sophisticated compilers can perform tricks to gain efficiency that most assembly language programmers would never think of. The main reason for the superiority of HLL, however, is that most of the cost of software development lies in maintenance, where readability and portability are crucial. These three concepts can be taken care of using careful programming.

No comments:

Post a Comment