3 ms·
> I just don't like his arguments about it must be fast to recompile everything. C isn't necessarily fast to recompile everything. Too much preprocessor magic
by skissane 2y ago
> I just don't like his arguments about it must be fast to recompile everything.
C isn't necessarily fast to recompile everything. Too much preprocessor magic and the compilation can slow down a lot.
And a lot of the reason for that, is that C's preprocessor is inherently weak – e.g. it doesn't explicitly have support for basic stuff like conditionals inside macros – but you can emulate it with deeply nested recursion – which blows up compilation times enormously. If C's preprocessor was a bit stronger and natively had support for conditionals/etc, one wouldn't need these expensive hacks and it would be a lot faster.
Example of real world project where C preprocessor slowed things down a lot is the Linux kernel: https://lwn.net/Articles/983965/ https://lwn.net/Articles/983965/
- catgirlinspace 2y agoI think the part you quoted is about it needing to be fast to compile from markdown to html, not compiling the C program.
- TrayKnots 2y agoyep