In computer technology, an interpreter is a computer system program that directly performs, i.e. executes, directions written in a programming or scripting language, without needing them previously to have been compiled right into a machine language program. The fundamental function of interpreter is like that of complier. In compiler, the program is translated entirely and directly executable version is generated. Whereas interpreter converts each instruction, performs it and afterwards the following instruction is translated and this takes place till end of the program. It also has program analysis capabilities. Nonetheless, it has some drawbacks as listed below:
- Instructions duplicated in program needs to be translated each time they are performed.
- Because the source program is converted fresh each time it is made use of, it is slow process or execution takes more time. Approx. 20 times slower compared to complier.
While interpretation and compilation are both primary ways by which programming languages are executed, they are not equally exclusive, as the majority of interpreting systems also carry out some translation work, similar to compilers. The terms “interpreted language” or “compiled language” represent that the canonical implementation of that language is an interpreter or a compiler, respectively. A high level language is preferably an abstraction independent of certain applications.