Translators come in two different forms. Each has a specific use and each has a large number of languages which are associated with them. Both translate source code to object code but they both do this task in different ways.

You are expected to be able to tell the difference between an interpreter and a compiler as well as being able to give the various advantages and disadvantages. Below is a list of the advantages and disadvantages of interpreters. Some example interpreted languages are Javascript, Visual Basic for Applications (VBA), BASIC, LISP, scheme and PROLOG.

Interpreters

Advantages

Disadvantages

Source code only has to be written once and then it can run on any computer running an interpreter.

As source code must be compiled each time, interpreted programs can sometimes run slowly.

You can test code much more quickly as well as being to test single lines of code out

You must have an interpreter running on the computer in order to be able to run it.

You can easily find out what the contents of variables are by asking the interpreter.

You can not have to rely on the interpreter for machine level optimisations rather than programming them in yourself. For example using 3dNow or MMX optimisations.

Code can be run on many different types of computers such as Mac's, UNIX, LINUX and PC's

 

 

Below is a list of the advantages and disadvantages of compilers. Common languages for compilers are C++, FORTRAN, and Visual Basic.

Compilers

Advantages

Disadvantages

Code is only compiled once so subsequent running's will run very quickly.

Code can only be compiled for a single operating system. For example, code written for windows will not work for UNIX.

No extra programs are needed once the object code has been produced.

Code is much more difficult to debug, especially if you have a logic error as you will not be able to see the contents of the variables unless you have a debugging program.