Empty VS null array?

Jesse Phillips Jesse.K.Phillips+D at gmail.com
Fri Oct 18 19:20:22 PDT 2013


On Friday, 18 October 2013 at 21:15:32 UTC, H. S. Teoh wrote:
> Yes, but if you declare a variable to contain a set, then by 
> definition
> there is *something*, even if it's an empty set. For there to be
> nothing, there shouldn't even be a variable in the first place. 
> The fact
> that the variable exists and has an identifer means that there 
> is
> *something*. So your argument is moot.
>
>
> T

We can declare a variable to contain an object, and there can 
still not be an object there.

You're trying to make arrays non-nullable. Which I suppose isn't 
so bad, it is a structure after all. Why do we even allow 
checking against null, can't do it with int or bool. (ok, I know, 
breaks code).


More information about the Digitalmars-d mailing list