static this sucks, we should deprecate it

grauzone none at
Thu May 28 03:51:51 PDT 2009

> Probably a silly idea, but what about (or similar):
> static this:, 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.)


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 +/ }"?

More information about the Digitalmars-d mailing list