3 ms·
So basically the #include granularity is extremely coarse, because otherwise it is unmanageable. I think it is nicer to have quite specific #include's: #inc
by Peaker 12y ago
So basically the #include granularity is extremely coarse, because otherwise it is unmanageable.
I think it is nicer to have quite specific #include's:
#include <stdbool.h>
#include <stdarg.h>
#include "hash_table.h"
Because it:
* Gives a list of dependencies at a glance
* Along with preprocessor optimizations to avoid reparsing protected headers, it can actually parse fewer headers in each compilation (reversing the performance argument by Rob)
* Can aid with greps for where modules are used
The comparison is really a strawman -- and the length of the GNU one and its many dependencies relate more to feature creep than to the #include issue here.
At least with GNU's #includes, I can see that it depends on the various stuff it needs for its feature creep.