Effective D book?
Peter Alexander
peter.alexander.au at gmail.com
Sun Jun 16 02:03:19 PDT 2013
On Saturday, 15 June 2013 at 21:30:50 UTC, Timon Gehr wrote:
> So does this:
>
> void main(){
> void writeln(string) {}
> writeln("foo");
> {
> import std.stdio;
> writeln("bar");
> }
> }
Still not seeing any issue. The first writeln cannot know about
the import because it is at a deeper scope, so only the second
writeln will print anything.
>> It also isn't a problem at all, ...
>
> It sure is, the module system is supposed to provide hijacking
> protection.
Hmm good point.
> More peculiar example:
> ...
> 'writefx' happens to be a private symbol in std.stdio.
I think this is just the separate bug where private symbols are
visible through imports. Should be solved by DIP22 IIRC.
More information about the Digitalmars-d
mailing list