Build using D

Guillaume Piolat first.last at gmail.com
Fri Apr 17 08:24:06 UTC 2020


On Thursday, 16 April 2020 at 17:11:39 UTC, NaN wrote:
> Why not actually use D as build system for D projects? I assume 
> DUB is written in D, but why not just have DUB features in a 
> library and use a D build script?
>
> rdmd build.d
>
> Is it a dumb idea?

It's a bad idea.

A declarative build description trades being power for being 
conventional and deriving rules that works on every project 
(through "lack of power").

For example, dub test, dub dustmite etc... are impossible with 
powerful immediate build (as opposed to declarative).

Your "unique" build combination has to be justified.
If a standard build system cannot express your program, _perhaps_ 
it's up to you to simplify your build, rather than the build 
system to adapt to unique complexity.

That said, there is always a large class of programs that cannot 
easily be built, that domain is cursed.


More information about the Digitalmars-d mailing list