On 23/09/22 07:27PM, NRK wrote: > And this is no longer the 50s, we have enough memory to build a couple > thousand line of code without *requiring* splitting things into multiple > intermediate object files to avoid going OOM (even with bloated > compilers like gcc/clang with optimization enabled).
It's not about memory, it's more about how easy it is for a human to navigate the source code. Of course, cscope and ctags exist, and reducing the number of lines of code is desired, but it is not always possible to reduce a program below 1k lines of code, so it needs splitting into several units. For example (according to sloccount[1]), my patched dwm fork has ~3.3k lines of C code across 5 .c files, my patched st fork has ~4.9k lines of C code across 2 .c files, and slstatus has ~2k lines of C code. My own programs are close to those numbers: some have up to ~5k lines of code combined only in .c files.
signature.asc
Description: PGP signature