Associative Array Non-null initialization

Steven Schveighoffer schveiguy at yahoo.com
Thu Oct 4 07:05:51 PDT 2007


"Kyle G." wrote
> Hi,
>
> I want to declare an AA such that it's starting length is 0, yet, it is 
> not null.

The question I would ask you is: why?

I understand that it is weird, and I agree it should be consistent, but 
using the length property is consistent.  Why not just ignore the comparison 
to null and only use the length check?

IMO, arrays should not be comparable to null, since they are internally 
structures.

-Steve 




More information about the Digitalmars-d-learn mailing list