Re:Ask HN: What is it about compiling that is so time-consum...
by yetihehe on Monday January 30, 2023 @01:31PM
(#34584225)
Compound that with inability to cache those headers between different compilation units because each time you include a header, it can behave differently thanks to preprocessor definitions, but you can't really make dependency of those definitions because even changing order of header inclusion can make difference to those definitions.
[ Parent
| on HN ]
Re:Ask HN: What is it about compiling that is so time-consum...
by canucker2016 on Monday January 30, 2023 @02:54PM
(#34585470)
...which is why sane, large projects use precompiled headers (PCH).
C (and later C++) compilers have used precompiled headers since at least the late 80s.
PCH speeds up compilation and roots out (hopefully, the few) cases where precompiled headers fail.
But C/C++ wasn't designed for a world where tens/hundreds of programmers build an app measured in the tens/hundreds of megabytes.