3 ms·
The PDP-11 was last century. Modern computers aren't much at all like the imaginary machine the C programming language is defined against. The compiler's job
by tialaramex 5y ago
The PDP-11 was last century.
Modern computers aren't much at all like the imaginary machine the C programming language is defined against.
The compiler's job is to wrestle what you wrote, for that imaginary machine, into machine code that will run on the real computer somebody actually owns which is quite different. This is a difficult task and it gets harder all the time.
Programmers who believe they're writing "bare metal" programs in C are delusional and are particularly likely to get a very rude awakening when they try to write concurrent software. What the machine really does is too hard for you to sensibly reason about at scale, so C provides SC for DRF and says if you do anything else (and you will) too bad your program's meaning is undefined and you lose.