On the other hand, you can end up with a code base that compiles relatively quickly if you pay attention to dependencies as you develop. Unfortunately, many projects let dependency get out of hand. Cleaning up the mess often requires considerable insight into the physical structure of the code.
Tools can help.
The standard disclaimers apply. In some sense, it is not quite real, but it suffices to demonstrate some aspects of emergent design. We know that the number of lines in the file is nine, but we'd like to have an object to tell us that. To compile this test, we'll need a class named CppFile that accepts a file name and provides a lineCount method. In a strongly typed language, the compiler is the first test that you run.