Empty VS null array?

H. S. Teoh hsteoh at quickfur.ath.cx
Fri Oct 18 15:27:19 PDT 2013


On Sat, Oct 19, 2013 at 12:04:47AM +0200, Meta wrote:
> 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.
> 
> Exactly. There is still *something*, even though the set is empty.
> That is, the set itself.
> 
> >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.
> 
> Not really. Null is a special marker to indicate the absence of a
> value. There is nothing, as opposed to the previous case.

That's if you consider a set to be a reference type. Then you can say
that the reference may be referring to something (which may be empty or
not), or it can refer to nothing (null).

But if the set is a value type, then there is no such thing as null,
only empty.


T

-- 
INTEL = Only half of "intelligence".


More information about the Digitalmars-d mailing list