DIP9 -- Redo toString API

bearophile bearophileHUGS at lycos.com
Fri Nov 19 06:30:11 PST 2010


Steven Schveighoffer:

> Who said setting an array to null is bad practice?  I disagree.  null is a  
> better way to represent it, because it sets both the ptr and the length to  
> 0, while "" only sets the length to 0.
> 
> char[] arr = "";
> 
> assert(arr == null); // passes
> assert(arr is null); // fails

I see, I didn't know this.

Bye,
bearophile


More information about the Digitalmars-d mailing list