News for hackers. Stuff that matters.
Re:Notes on Programming in C (1989) by Peaker on Sunday May 11, 2014 @12:00PM (#7728980)
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.

There are no comments on this comment yet.