Revamping associative arrays

Jason House jason.james.house at gmail.com
Sat Oct 17 11:48:26 PDT 2009


Andrei Alexandrescu Wrote:

> Associative arrays are today quite problematic because they don't offer 
> any true iteration. Furthermore, the .keys and .values properties create 
> new arrays, which is wasteful.
> 
> Another issue with associative arrays is that ++a[k] is hacked, which 
> reflects a grave language limitation. That needs to be replaced with a 
> true facility.
> 
> Any other issues with AAs that you want to see fixed, and ideas guiding 
> a redesign?
> 
> 
> Thanks,
> 
> Andrei

I've heard that D's AA's are not GC friendly.

I'd recommend looking at "high scale lib". It's a java container library designed for high throughput and high concurrency. I was going to try my hand at writing it, but the whole shared debacle kind of squashed that. With all the polishing of D2, when will shared be both well documented and well implemented. Shared updates haven't been in any of the recent changelogs.



More information about the Digitalmars-d mailing list