String to boolean inconsistency

Ellery Newcomer ellery-newcomer at utulsa.edu
Sat Dec 11 18:44:11 PST 2010


I forget, why are we supposed to use is instead of == with null?

On 12/11/2010 08:18 PM, Tomek Sowiński wrote:
> string s = "";
> assert(s); // ok
> assert(s != null); // fails
>
> I guess that's a bug. But which one is right?
>
> --
> Tomek


More information about the Digitalmars-d mailing list