whoa, I was just about go to bed, but turned the computer on because I just thought of one case where I think I want to do this: config files.

For my work apps, if I need config I always do them as a module:

config_a.d
===
module application.config;

enum featureA = true;
string appName = "Acme Software";
===


The selective module magic could be used to offer a default configuration, with the import overriding it if available:

static if(importIsAvailable!"app.config") {
   import app.config;
} else {
   enum featureA = false;
   string appName= "My App";
}

. That's potentially way cool.

Reply via email to