Need review: explicit package protection
Mike Parker via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jun 9 00:37:04 PDT 2014
On 6/9/2014 12:37 AM, Dicebot wrote:
>
> This new syntax will work:
>
> ---
> module std.internal.mod1;
> package(std) void foo() {}
> module std.mod2;
> ---
> import std.internal.mod2;
> void bar() { foo(); }
> ----
>
> Exact semantics can are described by added "protection" tests to
> test/compilable (last commit in this PR).
>
> Plain package behavior is unchanged and thus no breaking changes
> introduced.
Big +1 from me. I can see myself making good use of this.
More information about the Digitalmars-d
mailing list