Few things
Bruno Medeiros
brunodomedeiros+spam at com.gmail
Fri Aug 3 02:52:23 PDT 2007
Sean Kelly wrote:
> Bruno Medeiros wrote:
>> BCS wrote:
>>>> -------------------------
>>>>
>>>> 6) It can be useful a way to create an empty associative array with
>>>> something like:
>>>> new int[char[]]();
>>>>
>>>
>>> assigning null to an aa results in an empty aa, I'm not sure if it
>>> clear other references to it though.
>>>
>>
>> Are you sure of that? It seems that at least for AA's, empty arrays
>> are different than null arrays:
>>
>> int[char[]] b; writefln(b is null); // true
>> writefln(b == null); // true
>
> Huh. So equality comparisons with null work for AAs but crash with
> objects?
>
>
> Sean
Seems so, just as you don't need to allocate an AA to use it, it is done
automatically if the AA is null.
--
Bruno Medeiros - MSc in CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D
More information about the Digitalmars-d
mailing list