4 ms·
Excellent article. Just one quibble: he claims a module shouldn't be over 30k lines. Counterexamples: Linux, Postgres, Boost, LLVM, V8, all in the million line
by rwallace 11y ago
Excellent article. Just one quibble: he claims a module shouldn't be over 30k lines. Counterexamples: Linux, Postgres, Boost, LLVM, V8, all in the million line range. To be sure, each of these has an internal module structure, but that's irrelevant from the perspective of someone deciding whether to incur a dependency on one of them - the answer to which may very well be yes because they do enough to make it worthwhile.
If anything, larger modules like the ones I listed are more likely to be worth depending on because they do more. It's no coincidence that the author chooses command line parsing as a negative example - something trivial enough that the overhead of tracking a dependency may well outweigh the effort of implementing it yourself.