4 ms·
I think another source of confusion is that the term "compiler" has gained this connotation that all compilers generate low-level code from a high-level source
by tadfisher 13y ago
I think another source of confusion is that the term "compiler" has gained this connotation that all compilers generate low-level code from a high-level source language. However, once you understand the concepts, you realize that many things are technically compilers; source-to-source translators, for example, or ORM code generators.
Hell, I would call Python's own 2to3 tool a compiler: it generates a full parse tree using a grammar, it runs some translation rules, and it generates Python 3 code.
- xmonkee 13y agoThere are no compilers. There are translators and optimizers.
- 14113 13y agoThat's the definition of a compiler though, "A compiler is a computer program (or set of programs) that transforms source code written in a programming language (the source language) into another computer language (the target language)." All a compiler is is a combination of a translator and (possibly - but not necessarily) an optimiser.