What Makes A Programming Language Good

Adam Ruppe destructionator at gmail.com
Tue Jan 18 05:51:58 PST 2011


Jim wrote:
> Why can't the compiler traverse this during compilation in order to
> find all relevant modules and compile them if needed?

How will it find all the modules? Since modules and files don't
have to have matching names, it can't assume "import foo;" will
necessarily be found in "foo.d". I use this fact a lot to get
all a program's dependencies in one place.

The modules don't necessarily have to be under the current
directory either. It'd have a lot of files to search, which might
be brutally slow.

... but, if you do want that behavior, you can get it today somewhat
easily: dmd *.d, which works quite well if all the things are in
one folder anyway.


More information about the Digitalmars-d mailing list