Automatic typing
Timon Gehr
timon.gehr at gmx.ch
Mon Jul 1 10:07:48 PDT 2013
On 07/01/2013 06:15 PM, Walter Bright wrote:
> On 7/1/2013 6:39 AM, Ary Borenszweig wrote:
>>> This is not what I am talking about and it seems quite dangerous to have
>>> one variable name masquerade as multiple variables.
>>
>> Why dangerous?
>
> D already disallows:
>
> int x;
> { float x;
> }
>
> as an error-prone construct, ...
module b;
int x;
module a;
void main(){
int x;
{
import b;
x = 2;
}
import std.stdio;
writeln(x); // prints 0
}
More information about the Digitalmars-d
mailing list