Nested public imports - bug or feature?

rsw0x via Digitalmars-d digitalmars-d at puremagic.com
Thu Aug 13 06:44:48 PDT 2015


On Thursday, 13 August 2015 at 13:12:44 UTC, Dicebot wrote:
> Right now this works:
>
> ``D
> struct Std
> {
>   public import std.stdio;
> }
>
> void main()
> {
>   Std.writeln("Nice!");
> }
> ```
>
> I want to use it as an import hygiene idiom but not entirely 
> sure if this behavior can be relied upon (or it is just a side 
> effect of imports being implemented as aliases currently).

And we're back to namespaces : )


More information about the Digitalmars-d mailing list