Revamping associative arrays

Max Samukha spambox at d-coding.com
Sun Oct 18 02:17:25 PDT 2009


On Sun, 18 Oct 2009 04:29:57 -0400, bearophile
<bearophileHUGS at lycos.com> wrote:

>Max Samukha:
>
>> I agree. But the problem is the lack of a decent way to instantiate an
>> empty AA. Now you either have to do idiotic things like:
>> 
>> int[int] a;
>> a[1] = 1;
>> a.remove(1);
>> 
>> Or wrap the array in another type.
>
>This is an empty AA, you need nothing else:
>int[int] a;

I showed in my original post it is not enough to use AA as a reference
type.



More information about the Digitalmars-d mailing list