Hacker News new | ask | show | jobs
by philwelch 5951 days ago
How long is recompiling really going to be if it's one file, though? I'm not talking about C++, which clang isn't quite fluent in yet, but one file of pure C shouldn't take long to compile. Or have I not been compiling the right C files?
1 comments

Let's say you edit point.h, and many files include it. Then these files must be compiled too, and the files that include them, etc. until eventually you compile nearly the whole application.

I've been bitten by the dependencies in C++ before. I have this file "image.h" which contains a templated image class with quite a few algorithms. My app is about image processing, so nearly everything uses the image datatype. I hate having to edit this file because it means recompiling nearly everything. Of course templates make it much worse than pure C...