grauzone wrote:
Probably a silly idea, but what about (or similar):
static this: mod.name, mod.name2, mod.name3
{
}
For a dependency list. I may be wrong, but afaik the main problems
stem from either wrong order or co-dependence (which needs to be
solved by the programmer.)
vote++
You can always solve those dependency issues by moving code into new,
separate modules. But the D module system requires creating a new file
for each module. You'd end up with dozens of modules, that only contain
trivial stuff for breaking circular dependencies.
Your proposal needs a way to specify "no dependencies". How about
"static this : void { /+ code +/ }"?
Specifying static this dependencies would be a nice idea, deprecating
static this as OP said not so good. Why would you need to specify no
dependencies? The way it works now is not ambiguous and wouldn't
conflict with the dependencies syntax.