I found this question while trying to answer this question. It would be useful to know more about what actually happens instead of the simple text substitution which the C/C++ preprocessor performs.
I would guess that in Julia, include parses the target file and generates an AST.
What I’m interested in understanding is what happens if you include a file more than once, possibly in multiple places.
Does Julia do something to make sure it doesn’t end up with multiple copies of the same AST loaded from the same file?
Btw I could be mistaken. Maybe include does not create an AST.