Assembler · Compiler · Interpreter · Stages of Compilation
| Feature | Compiler | Interpreter |
|---|---|---|
| Translation | Whole program at once | Line by line during execution |
| Output | Standalone executable | No separate file produced |
| Execution speed | Faster (pre-translated) | Slower (translates every run) |
| Error reporting | All errors at compile time | Stops at first error found |
| Distribution | Share executable (no source) | Must share source code |
| Portability | Platform-specific executable | Portable (interpreter needed) |
| Debugging | Harder (all errors at once) | Easier (line-by-line testing) |