Beta 2.079.0

John Gabriele jgabriele at fastmail.fm
Tue Feb 20 22:19:03 UTC 2018


On Tuesday, 20 February 2018 at 20:08:55 UTC, jmh530 wrote:
> On Tuesday, 20 February 2018 at 19:36:46 UTC, John Gabriele 
> wrote:
>>
>> In:
>>
>>     import myModule : foo, bar;
>>
>> how do you know if bar is myModule.bar or if it's a separate 
>> module bar?
>
> It probably could be described a little better in the change 
> log. It uses examples, but doesn't really describe what the 
> file structure is that work with those examples.
>
> Perhaps this:
>
> --- pkg.d
> module pkg;
>
> public import pkg.mod1;
> public import pkg.mod2;
>
> --- pkg.mod1.d
> module pkg.mod1;
>
> enum sym1;
>
> --- pkg.mod2.d
> module pkg.mod2;
>
> enum sym2;
>
> If this structure works for both of those examples, then
> import pkg.mod1 : sym1, mod2 : sym2;
> works because mod2 has a selective import and
> import pkg.mod1 : sym1, sym2, pkg.mod2;
> works because pkg.mod2 is fully qualified (it may be annoying 
> to find sym2 if this works with the above structure).

Thanks. Is the point to be able to string a bunch of selective 
imports together, as in:

     import pkg.mod1 : sym1, sym2, pkg.mod2 : sym1, sym2, pkg.mod3 
: sym1;

?

That's difficult to read; it's hard to see the difference between 
the commas that separate the symbols vs the commas that separate 
the modules+symbols groups.



More information about the Digitalmars-d-announce mailing list