Posted: Sat Oct 08, 2005 9:58 am
In my opinion,
COMPILER, Changes source code to object code. creating an executable file. Object code doesn't necessarily have to be machine code, could run on some virtual machine ie Java.
INTERPRETER, Changes source code to object code, doesn't create an executable, instead it translates an instruccion then executes the code, and so on until the end of the program. Early BASIC were usualy interpreters, nowadays PERL, PYTHON (also refered to as scripting languages).
Interpreted languages can often be compiled too. The importance of using one or another is not as relevant nowadays as in the past. Compiling could take a long time and had to be recompiled every time you made a change in the source. Nowadays compilers are much faster and it's not always necessary to recompile the whole source. If you used an interpreter you could change code on the fly and try it out immediately. The price to pay was much slower programs.
In the past low-medium level languages used to be compiled and high level languages interpreted.
If one wants to one could spend the rest of ones life discussing wether something is realy a compiler or an interpreter. In the end the CPU executes and instruction after an other. But it's rare to find a piece of code nowadays that will run independently of an OS and many other stuff like directX etc.
COMPILER, Changes source code to object code. creating an executable file. Object code doesn't necessarily have to be machine code, could run on some virtual machine ie Java.
INTERPRETER, Changes source code to object code, doesn't create an executable, instead it translates an instruccion then executes the code, and so on until the end of the program. Early BASIC were usualy interpreters, nowadays PERL, PYTHON (also refered to as scripting languages).
Interpreted languages can often be compiled too. The importance of using one or another is not as relevant nowadays as in the past. Compiling could take a long time and had to be recompiled every time you made a change in the source. Nowadays compilers are much faster and it's not always necessary to recompile the whole source. If you used an interpreter you could change code on the fly and try it out immediately. The price to pay was much slower programs.
In the past low-medium level languages used to be compiled and high level languages interpreted.
If one wants to one could spend the rest of ones life discussing wether something is realy a compiler or an interpreter. In the end the CPU executes and instruction after an other. But it's rare to find a piece of code nowadays that will run independently of an OS and many other stuff like directX etc.