Does D have too many features?
Jonathan M Davis
jmdavisProg at gmx.com
Sun Apr 29 22:03:52 PDT 2012
On Sunday, April 29, 2012 21:56:08 H. S. Teoh wrote:
> I wonder if dmd (or rdmd) should have a mode where it *only* compiles
> unittest code (i.e., no main() -- the resulting exe just runs unittests
> and nothing else).
It wouldn't make sense. It's nowhere near as bad as C++, but dmd has to
recompile modules all the time unless you compile the entire program at once.
When you run a build, every single module on the command line and all of the
imported modules get compiled. Object code is generated only for those on the
command line, but the others are still compiled. Any imported module which
uses a .di file won't have as much to compile, and any templated code that
doesn't get used in those modules won't get compiled, but there's still lots
of recompilation going on if you compile your program incrementally. And D
just isn't set up to compile only a portion of a module.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list