On Sat, 21 Mar 2009 22:19:31 +0200, grauzone <n...@example.net> wrote:
I don't really understand what you mean. But if you want the compiler to scan for dependencies, I fully agree.

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.

Well, why not get rid of the imports altogether... Ok, that would not be feasible because of the way compilers (D, C++, etc) are build nowadays.

I find adding of #includes/imports laborious. (Is this component already #included/imported? Where's that class defined? Did I forgot something?) And when you modify or refractor the file, you have to update the #includes/imports accordingly...

(In case of modification/refractoring) the easiest way is just to compile the file, and see if there's errors... Of course, that approach will not help to remove the unnecessary #includes/imports.

So, sometimes (usually?) I give up, create one huge #include/import file that #includes/imports all the stuff, and use that instead. Efficient? Pretty? No. Easy? Simple? Yes.

#includes/imports are redundant information: the source code of course describes what's used in it. So, the compiler could be aware of the whole project (and the libraries used) instead of one file at the time.

Reply via email to