3 ms·
> As others noted, the Dragon Book spends far too much time on parsing, and not nearly enough on optimizations. If you actually want to specialize in writing c
by rectang 6y ago
> As others noted, the Dragon Book spends far too much time on parsing, and not nearly enough on optimizations.
If you actually want to specialize in writing compilers, that may be true.
But most people who study compilers don't write compilers. Instead, the time they spend studying compilers will help them to better understand programming language design, which will make them more effective at programming anything.
And for that, it is far better to spend lots of time on parsing than on esoteric compiler optimizations.'
> (Engineering a Compiler; Cooper & Torczon)
I bought that book, but didn't get much out of it because it concentrates on compiler optimizations and seems to be truly targeted for an audience of compiler specialists. Instead, I chose Programming Language Pragmatics by Michael L. Scott, and went through nearly the entire thing with a study group over about 10 months.
- WalterBright 6y ago> esoteric compiler optimizations The D programming language design is based in part on my experience with designing and building compiler optimizers, including the first data flow analysis C compiler for DOS. It's why D has, for example, immutable types rather than just const types. (You can't optimize C const pointers because another mutable reference to the same value can change it.) D's contracts are also designed with an eye towards enabling optimizations.
- tester34 6y ago> Instead, the time they spend studying compilers will help them to better understand programming language design, which will make them more effective at programming anything. What makes you think that? especially 2nd part, but actually both