News for hackers. Stuff that matters.
Re:Small Project Build Systems (2021) by cout on Monday April 03, 2023 @02:01PM (#35428501)
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.

Re:Small Project Build Systems (2021) by akkartik on Tuesday April 04, 2023 @01:29AM (#35435468)
I 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

More details: https://news.ycombinator.com/item?id=33574154#33575045