Is there a way to forward-declare interfaces to avoid module interdependencies?

Per Ångström d-news at
Tue Nov 30 08:11:40 PST 2010

On 2010-11-29 16:39, Steven Schveighoffer wrote:
> On Sun, 28 Nov 2010 09:58:42 -0500, Per Ångström <d-news at> wrote:
>> However, I wish the situation could be detected at compile-time.
> It could only be detected at link-time, and the linker doesn't do any
> custom processing, it just links.

Actually, I should have written "without running the program", be it 
compile-time or link-time.

> But in any case, I still don't understand why you want to avoid
> interdependencies. D is supposed to handle them well.

It's something I caught from reading Lakos's _Large Scale C++ Software 
Design_ back in the 90's. Of course, D's module system alleviates a lot 
of the problems with interdependencies in C++, but still, highly 
interdependent systems are harder to test and less easy to change. I 
don't think D has changed the game completely, making interdependencies 
largely a non-issue.
Per Å.

More information about the Digitalmars-d-learn mailing list