[Dlang-internal] Removing ddmd. prefix from dmd module names

Mathias Lang via Dlang-internal dlang-internal at puremagic.com
Thu Nov 10 02:32:16 PST 2016


On Thursday, 10 November 2016 at 07:44:08 UTC, Walter Bright 
wrote:
> The dmd build has a problem - all the .d files have to be 
> specified on the same command line. The trouble is the prefix 
> ddmd. on all the imports, yet there is no ddmd directory. D is 
> designed to have the path/file structure match the 
> package/module structure.
>
>   https://github.com/dlang/dmd/pull/6249
>
> illustrates the change. Another option is to move the files 
> into a subdirectory named 'ddmd'.
>
> It's worth some wider discussion.

Thanks for bringing the topic up.
Linking for the issue where the discussion started, for 
reference: https://issues.dlang.org/show_bug.cgi?id=16071

I would much rather go with the second solution, that is, move 
the files from `src/` to `src/ddmd/`.

That will prevent some silly conflicts you can see with 
un-packaged modules. One bug we witnessed during the D2 porting 
is for example that any module which has the same name as one of 
it's symbol (in our case, `Version.Version`) is unusable if the 
module is imported unqualified, because the module itself is a 
symbol.


More information about the Dlang-internal mailing list