Compilers have nothing to do with machine code, other than that's sometimes the output target. There are plenty of other (often more interesting) targets.
Compilers have nothing to do with machine code, other than that's sometimes the output target. There are plenty of other (often more interesting) targets.
Learning about compilers and programming languages is important because of the principles inherent in building them, which average programmers never completely get.
In my opinion, these principles are:
1) Code is data, and data can be code.
2) The only sensible way to deal with unmanageably-large amounts of code is by creating a language (whether this be an API, a protocol, a DSL, or a Turing-complete programming language) to communicate with.
3) Many classes of problems can be thought of as a transformation of a data-structure in one language to an "equivalent" data-structure in another language, which at its core, is all a compiler does.
It's been said that algorithm + data structure = program. But really, the only true 'algorithm' is the cpu. Everything else is clever data structures.
Just thought I would say...