4 ms·
> Modules are the answer, but it seems nobody cares enough to get them in the standard or, more likely, it's just too hard a problem. Aren't modules especially
by Joky 10y ago
> Modules are the answer, but it seems nobody cares enough to get them in the standard or, more likely, it's just too hard a problem.
Aren't modules especially limited with the mentioned problem of templates?
If I have a vector of a custom type, I still have to instantiate it in every file that is using this type, I don't think modules help much here, they reduce the amount of time parsing, not instantiating if I understand correctly.
We'll need to significantly change the way we handle templates in compilers to get significant improvement.
- netheril96 10y agoMost of the time the same template with the same parameters are instantiated multiple times. If modules work, there should be only one compilation.