4 ms·
I'm a fan of using two translation units: * one TU with code that is fast to compile and modified often * another TU with code that is slow to compile but mod
by cout 4y ago
I'm a fan of using two translation units:
* one TU with code that is fast to compile and modified often
* another TU with code that is slow to compile but modified rarely
I still use header files, but the fast-to-compile and modified-often code goes directly into headers, so I can still organize my code into separate files.
- akkartik 4y agoI got sick of juggling code that migrated from one category to the other, so I wrote a little script that deals with chopping up a large source file into multiple TUs before feeding them to the compiler. https://github.com/akkartik/mu1/blob/master/build2 https://github.com/akkartik/mu1/blob/master/build2 More details: https://news.ycombinator.com/item?id=33574154#33575045 https://news.ycombinator.com/item?id=33574154#33575045