So many times did i feel the need for this feature:
// ---------- first module ----------
module first;
static version = MY_API;
/*
* My API implementation.
*/
// ---------- second module ----------
module second;
import first;
version(MY_API)
{
// My API usage.
}
The behavior is exactly the same as with -version=MY_API passed to command
prompt.
This doesn't look like a difficult feature to implement, and AFAIK a very
useful one (especially when binding C libraries, which define compile-time
version information).