Hi all.
How to use use selective imports more effectively? I have two modules foo and bar:

module foo;

class Foo {}

module bar;

import foo: Foo;

class Bar
{
        private Foo foo_;
        this(Foo foo)
        {
                foo_ = foo;
        }
}

Now I add module baz that use both modules above. How to import foo and bar - everything or only 'the topmost' one, bar?

module baz;

import bar: Bar;
import foo: Foo;

or

import bar: Bar, Foo; // also in bar import of foo.Foo should be public of course

I don't see difference, but it doesn't mean it doesn't exist. What do you think about it?

Reply via email to