DMD can implicitly convert class pointer to the bool. Is it bug or terrible feature?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Nov 24 15:31:41 PST 2013


On 11/24/13 11:17 AM, bearophile wrote:
> Walter Bright:
>
>> Shadowing globals is definitely a bad idea. Shadowing members, it's
>> debatable.
>
> So are you saying D here should give an error for the shadowing of the
> module-level x?

I think he meant "shadowing locals". As I wrote in TDPL, it's a bad idea 
to add a global somewhere and break a bunch of code that has nothing to 
do with it.

Andrei



More information about the Digitalmars-d mailing list