Monday, June 20, 2011

Comparison of Interpreted and Compiled Languages

In order to communicate with the computer, user needs a language that should be understood by the computer. To achieve this and to perform different types of works on the computer different languages were developed. Programming languages are instructions and logic and they are used to develop the software. Programming languages can be divided in to two types - one is interpreted languages and the other is compiled languages. These languages are immediately converted in to machine code, which is the basic instruction set used by a device's hardware.

Programming code is written using certain programming language, and it is termed as source code and this source code has to be converted into a format appropriate for the hardware or software environment in which it will be run. When a language is compiled, its source code is converted into machine code and this code will run only on the hardware type for which it is compiled.

Primary advantage of the interpreted language is its ability to execute regardless of the architecture they're running on. JavaScript, which is a language commonly used to build Internet sites regardless of operating system or Internet browser can run the same. On the other hand, compiled languages have speed, because the computer code is converted into a format suitable for the specific hardware/software environment, less work is required to execute the application and the code can run with more efficiency.

Each of the two types of the languages have their own advantages and disadvantages. The exact distinction between compiled and interpreted is often ill defined and unclear. Some programming languages can be compiled and interpreted and the purpose for which the language going to be used determines which is the best approach.

No comments: