Delight
bearophile
bearophileHUGS at lycos.com
Sun Sep 28 17:40:53 PDT 2008
Sergey Gromov:
> Recursive building is a special case for simple tools, and in a
> large project you do want an incremental build.
This is true, but for small programs it seems bud (and another similar tool) is enough (my experience with DMD shows that 'small' means up to more than 80000 lines of code). And putting that basic functionality into the compiler, that already parses code, can probably bump that limit up a little higher.
So why not offer a handy feature for all the small cases, plus the capability of using complex incremental builds for large programs?
Giving the programmer sensible "defaults" for simple very common cases (such very common cases have to be found experimentally) sometimes makes the difference between a handy computer language (or a handy technological system) and a language that isn't nice at all (this is often one little secret of scripting languages).
If D wants to be used for smaller programs too (see the other thread here about people using D for scripting-like purposes of text processing) sensible defaults and a handy building becomes important.
Do you know why DMD has the -run compilation flag, plus it accepts the shebang syntax that you often find at the top of scripts like Perl/Python ones? It may be of little use if you have to compile a large project, but for smaller quicker things they are useful.
> But a build system can definitely do that. Bud could do that. Bud
> could define a -version=builders, or define -version=mainmodule when
> compiling the first module in the chain.
I see :-) Well, this solution of yours is better than nothing. I don't know if bud is updated still.
But the name of the constant you have to use into the code is is different for each module, it's not a standard one like I have suggested. So your solution is worse still.
Bye,
bearophile
More information about the Digitalmars-d-announce
mailing list