Ellery Newcomer wrote:
Nick Sabalausky wrote:
-------------------------------------
//File: foo/fooA.d
module foo.fooA;
class fooA {}
//File: foo/fooB.d
module foo.fooB;
class fooB {}
//File: foo/fooC.d
module foo.fooC;
class fooC {}
//File: foo/all.d
module foo.all;
public import foo.fooA;
public import foo.fooB;
public import foo.fooC;
//File: main.d
import foo.all;
void main() {...}
-------------------------------------
This works fine and does exactly what you want.
How well will this work if there is fairly tight coupling between these
three classes?
Not well at all :-). Technically, it should work the same as if they
were in the same module, but compiler bugs dealing with forward
references keep this from happening. I think a while back there was a
version of LDC that pretty much fixed forward reference issues, but it
introduced a bunch of regressions.