Interpretation, Compilation (3.2.a, 3.2.d)
Source code is translated, either by an interpreter or a compiler. Generally languages are either interpreted or compiled - a common exception is Java (which can be run on a virtual machine or compiled into bytecode).
Advantages of interpreted (or intermediate) code
- The program can be tested quickly, as the whole program does not need to be recompiled after changing the source code.
- The program can be run on any operating system with an interpreter installed.
- Errors are easier to correct, as they are reported as they occur.
- Breakpoints can be inserted into the code (for debugging).
Advantages of compiled code
- Source code is translated once into object code. After a program has been compiled, it runs using object code (which is faster than an interpreted language, which effectively "compiles" the code JIT, line-by-line).
- The end-user does not have to find and download an interpreter.
- Errors are reported to the developer when the program is compiled, as opposed to the end user when they occur.
- The source code can be kept confidential (for commercial or security purposes).