Is empty array null?

Justin Whear justin at economicmodeling.com
Mon Feb 27 13:17:46 PST 2012


On Mon, 27 Feb 2012 17:44:40 -0300, Pedro Lacerda wrote:

> The expression "[] is null" evaluates to true here using 2.058, but I
> expected to be false. What am I missing?
> 
> Pedro Lacerda
> <div>The expression "[] is null" evaluates to true here using
> 2.058, but I expected to be false. What am I
> missing?</div><div><br></div><div>Pedro Lacerda</div><br> The expression
> "[] is null" evaluates to true here using 2.058, but I expected to be
> false. What am I missing?
> 
> Pedro Lacerda
> <div>The expression "[] is null" evaluates to true here using
> 2.058, but I expected to be false. What am I
> missing?</div><div><br></div><div>Pedro Lacerda</div><br>

null makes sense to me. If the length is null, where can the ptr member 
point to other than null? Plus, anyone coming from C uses null to signify 
empty and anyone coming from Lisp uses the empty list to signify Nil.


More information about the Digitalmars-d-learn mailing list