null references redux + Looney Tunes

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sun Oct 4 14:58:57 PDT 2009


bearophile wrote:
> opIf sounds strange :-) Why don't you like the idea of the implicit
> conversion to bool followed by the testing of the bool? (someone may
> have already answered a similar question, please bear with me).

Try this:

void * p;
if (p) {}

Then try this:

void * p;
bool b = p;


Andrei



More information about the Digitalmars-d mailing list