Hacker News new | ask | show | jobs
by exikyut 2958 days ago
Hmm. How would you do away with header files in a simple way if you wanted something similarly-scoped to C? Have the compiler vacuum in every source file at once to pick up all references, then discard via dead code elimination? That'd kill incremental compilation :/

(I'm genuinely curious about the answer to this question - I'm also looking for something similar to C)

1 comments

Incremental compilation creates .o files for every compiled .c file, and so it could also create a .h file at the same time (perhaps fused in the .o file).
Ooooh, duh. Takes notes