Interpreters and Compilers
Definitions, Differences, and Similarities
I. The Problems
- Machines (computers) understand "machine language" (binary
code).
- People understand written languages -- words and symbols.
- Different processors use different binary coding schemes.
- Different computer designs will effect the design of the "best"
machine language.
- The Expressibility problem
- People think about different problems (Physicist vs. Desk Clerk)
- The same problem can be thought about in different ways (Planck vs.
Einstein).
- Language effects our thought process (George Orwell, Noam Chomsky).
II. The Solutions
Translators
- Worked or it didn’t --- no error messages!
- Translation of English-like language (COBOL)
- Heavy on declarative syntax.
- Obsolete.
Interpreters - Convert language to machine code at run-time.
- Unsure about the extent of the problem.
- Light to non-existent declarative syntax.
- In current use:
a) Computer languages
b) Editors
c) Command processors
Compilers - Prepare Large amounts of machine code in advance (compile-time).
- Problem is well-defined.
- Light to heavy on declarative syntax.
- In current use:
a) Large-scale "Traditional" Software development
b) Operating Systems
c) Production interpreters