== Quote from grauzone ([email protected])'s article > I claim that we don't even need incremental compilation. It would be > better if the compiler would scan for dependencies, and if a source file > has changed, recompile the whole project in one go. This would be simple > and efficient.
I'm surprised that this could possibly be more efficient than incremental compilation, but I've never worked on a project large enough for compile times to be a major issue, so I've never really looked into this. If incremental compilation were removed from the spec, meaning the compiler would always know about the whole program when compiling, I assume (correct me if I'm wrong) that would mean the following restrictions could be removed: 1. std.traits could offer a way to get a tuple of all derived classes, essentially the opposite of BaseTypeType. 2. Since DMD would know about all derived classes when compiling the base class, it would be feasible to allow templates to add virtual functions to classes. IMHO, this would be an absolute godsend, as it is currently a _huge_ limitation of templates. 3. For the same reason, methods calls to classes with no derived classes could be made directly instead of through the vtable. Of course, these restrictions would still apply to libraries that use .di files. If incremental compilation is actually causing more problems than it solves anyhow, it would be great to get rid of it along with the annoying restrictions it creates.
