In computer science, an interpreter is a computer program which reads source code written in a high-level programming language, transforms the code to machine code, and executes the machine code. Using an interpreter, a single source file can produce equal results even in vastly different systems (e.g. a PC and a PlayStation3). Using a compiler, a single source file can produce equal results only if it is compiled to distinct, system-specific exe...
more
In computer science, an interpreter is a computer program which reads source code written in a high-level programming language, transforms the code to machine code, and executes the machine code. Using an interpreter, a single source file can produce equal results even in vastly different systems (e.g. a PC and a PlayStation3). Using a compiler, a single source file can produce equal results only if it is compiled to distinct, system-specific executables.
To improve performance, some programming language implementations can interpret or compile the original source code into a more compact, intermediate form and then translate that into machine code (e.g. Perl, Python, MATLAB, and Ruby). Some accept source files saved in this intermediate representation (e.g. Python, UCSD Pascal and Java).
There is a spectrum of possibilities between interpreting and compiling, depending on the amount of analysis performed before the program is executed. For example, Emacs Lisp is compiled to bytecode,...
less