Thread overview
named import are always public
Sep 10, 2013
Namespace
Sep 10, 2013
Gary Willoughby
Sep 10, 2013
Jonathan M Davis
Sep 10, 2013
Namespace
September 10, 2013
I have already found an old bug report for this, but I do not understand why it has still not been solved. Can someone explain that to me?

Example:

a.d:
----
module a;

private import std.stdio : writeln;
----

b.d:
----
import a;

void main() {
	writeln("This is wrong.");
}
----

WTF? writeln should be private.
I don't like this. :P
September 10, 2013
On Tuesday, 10 September 2013 at 08:22:18 UTC, Namespace wrote:
> I have already found an old bug report for this, but I do not understand why it has still not been solved. Can someone explain that to me?
>
> Example:
>
> a.d:
> ----
> module a;
>
> private import std.stdio : writeln;
> ----
>
> b.d:
> ----
> import a;
>
> void main() {
> 	writeln("This is wrong.");
> }
> ----
>
> WTF? writeln should be private.
> I don't like this. :P

This is a WTF, where's the old report?
September 10, 2013
On Tuesday, September 10, 2013 10:22:17 Namespace wrote:
> I have already found an old bug report for this, but I do not understand why it has still not been solved. Can someone explain that to me?

Simple. No one has gotten around to fixing it, just like with any other bug that hasn't been fixed yet. IIRC, there was an attempt to fix it a while back, but the fix was faulty, and AFAIK, no one has presented a correct fix since. Just like with any other bug, someone has to step up and take the time to fix it and submit a pull request with the fix.

- Jonathan M Davis
September 10, 2013
On Tuesday, 10 September 2013 at 09:35:34 UTC, Jonathan M Davis wrote:
> On Tuesday, September 10, 2013 10:22:17 Namespace wrote:
>> I have already found an old bug report for this, but I do not
>> understand why it has still not been solved. Can someone explain
>> that to me?
>
> Simple. No one has gotten around to fixing it, just like with any other bug
> that hasn't been fixed yet. IIRC, there was an attempt to fix it a while back,
> but the fix was faulty, and AFAIK, no one has presented a correct fix since.
> Just like with any other bug, someone has to step up and take the time to fix
> it and submit a pull request with the fix.
>
> - Jonathan M Davis

There is the pull:
https://github.com/D-Programming-Language/dmd/pull/2256