News for hackers. Stuff that matters.
Re:A Module System for C++ (Revision 2) [pdf] by golemotron on Tuesday October 14, 2014 @07:51PM (#8456488)
This. And the reason that C++ compilation is so painfully slow is that unlike languages who saw C++'s problems and corrected them (Java, C#), a C++ compiler can not glean definitions from compiled code.

In Java, the compiler reads a Java file once, produces a class file and the class file contains all the information needed to compile other files that refer to its contents.

In C++, the compiler has to read all of source declarations that are used by a compilation unit, over and over again. An arbitrary cpp file can transitively include tens to hundreds of header files. Modern C++ compilers can play caching tricks, but the model is intrinsically O(n^2) compilation rather than O(n) compilation where n is the number of source files.

Re:A Module System for C++ (Revision 2) [pdf] by WalterBright on Tuesday October 14, 2014 @11:07PM (#8457002)
There are a lot of reasons why compiling C++ is inherently slow, but one big one is having a text preprocessor implementing an entirely different language tacked on the front.