Akim Demaille wrote: > >> I agree short lived entities should have short names. That's > >> actually one benefit (the only one?) to have *.h and *.c files: > >> *.h files can expose intelligent meaningful names, while *.c can > >> use short names. > > > > I think we could still do that in a single source file with a little > > discipline. I'd love to have real modules in C++ (one day ...). > > I'm eager to have modules, especially for the speedup.
Sure, but also to avoid repeating declarations/definitions etc. Talking about speedup, since we're fantasizing of language/compiler features, I wonder if a compiler like gcc couldn't achieve a lot by caching. Precompiled headers are one thing (but usually not the most time-consuming part). But many parts of code generation and optimization are done over and over again when recompiling some source with small changes. If gcc could cache their results (of course, with exact details of the necessary context and preconditions -- that's the tricky part), it might be able to speed up subsequent compilations a lot. But I know that's not exactly easy to implement ... Regard, Frank
