2 ms·
I come from the Java world, so I'm very used to every semantically separate bit of code sitting in its own file. I think it's superior to having multi-KLOC sour
by badpun 4y ago
I come from the Java world, so I'm very used to every semantically separate bit of code sitting in its own file. I think it's superior to having multi-KLOC source files (as is common in C/C++ world, because it minimizes the header writing and maintenance busywork), because then you can browse code via a file browser, which is typically a panel in your IDE. The C alternative to that would be having the same file opened in multiple tabs, and heavy usage of (IDE) bookmarks? I don't find that as convenient.
As to improving modularization, in order to fix compilation speed issues I was trying out the "program as a single compilation unit" approach advocated by handmade people, and I found that I had to spent a good amount of time in moving code between modules, and their subsequent headers. So annoying... Perhaps it wouldn't be so infuriating if I didn't spend the past 15 years coding in languages where this is a problem solved automatically and invisibly by the compiler.