Clarification about compilation model and the mapping of package names to directory.

Bruno Medeiros via Digitalmars-d digitalmars-d at puremagic.com
Fri Apr 29 10:44:51 PDT 2016


On 29/04/2016 18:20, Adam D. Ruppe wrote:
> On Friday, 29 April 2016 at 16:14:30 UTC, Bruno Medeiros wrote:
>> Why is this useful in any substantial way?
>
> I use modules for grouping compile time configuration options in
> independent files that can be swapped out. The module name doesn't match
> the file name because there are several files with the same module name,
> only one of which is used at a time.

Are you using DUB here?

>
> It is also valuable to swap out library implementations. For example,
> when modifying Phobos modules, instead of recompiling the whole thing, I
> can just specify the path to my modified version.
>
> dmd yourfile.d phobosfork.d
>
> no need to recreate layers of folders just to appease a random rule.
>
> I also hate having empty folders laying around, and matching names would
> force that.

To be clear, I don't mind that DMD itself allows such behavior. But I 
would like it to be invalid for DUB bundles. So some of those cases you 
mentioned wouldn't be affected, like modifying Phobos modules.

-- 
Bruno Medeiros
https://twitter.com/brunodomedeiros


More information about the Digitalmars-d mailing list