Interpreters

An interpreter translates source code into object code one instruction at a time. It is similar to a human translator translating what a person says into another language, sentence by sentence. The resulting object code is then executed immediately. The process is called interpretation.

Interpreters have several advantages:

Instructions are executed as soon as they are translated.
Since instructions are executed once translated, they are not stored for later use. As a result, interpreters require less available memory.
Errors can be spotted quickly. Once an error is found, the program stops running and the user is notified at which part of the program the interpretation has failed. This makes interpreters extremely useful when developing programs.
Interpreters also have several disadvantages:

Interpreted programs run more slowly. The processor has to wait for each instruction to be translated before it can be executed.
Additionally, the program has to be translated every time it is run.
Interpreters do not produce an executable file that can be distributed. As a result, the source code program has to be supplied and this could be modified without permission.
Interpreters do not optimise code - the translated code is executed as it is.
Posted on by