In computing, an interpreter is a computer program that executes or carries out instructions written in a programming language.
Interpretation is one of the ways of executing computer programs, the other is compilation.
The term «interpreter» can refer to the program that executes the source code that has just been translated into an intermediate form, or it can refer to the program that does both the translation and the execution.
Interpreters vs compilers
Any language can be executed either via the interpreter or via the compiler, but some languages tend to be associated more with one way than the other, and for this reason they are called «interpreted languages» or «compiled languages» respectively.
It can also happen that a program contains parts that are implemented via the interpreter and others via the compiler.
There are also interpreters that include some «compilation» in the middle. They are those that compile to intermediate code called bytecode, which is more efficient to execute than directly from source code.
In general, the main disadvantage of interpreters is that when a program is interpreted, it tends to run slower than if the same program were compiled. This is because the interpreter must parse every statement in the program on every execution (a real-time parse). Also variable access is slower in an interpreter, because mapping identifiers to store locations must be done repeatedly in real time.
Related:
Compiler.
Quote the definition:
Alegsa.com.ar (2016). Interpreter Definition – ALEGSA url: https:///Dic/interprete.php
Doubts? needs more information? Write and we will respond to your email: click here