Effective D book?

Peter Alexander peter.alexander.au at gmail.com
Sun Jun 16 02:06:18 PDT 2013


On Saturday, 15 June 2013 at 23:36:35 UTC, Walter Bright wrote:
> On 6/15/2013 2:34 PM, Timon Gehr wrote:
>> It sure is, the module system is supposed to provide hijacking 
>> protection.
>
> Inner scopes override outer scopes. That isn't what hijacking 
> is.

I think this is an issue Walter, consider:

void main()
{
     import std.stdio;
     string message = "Hello, world!";
     writeln(message);
}

It std.stdio contains a symbol called "message" then this will 
not print "Hello, world". Updates to libraries that introduce 
symbols could subtly break working code.

Whether or not this is what hijacking is, I think this is a 
problem.


More information about the Digitalmars-d mailing list