Error: no property 'sort' for type 'ulong[string]' , sometimes

Derix derix at dexample.com
Sun Oct 20 10:25:06 PDT 2013


On Sunday, 20 October 2013 at 16:06:54 UTC, bearophile wrote:
> Also, what do you mean sorting an associative array?
Yep, that's the point. I fumbled further and came to the 
realization that maybe there is no such thing as a sorted 
associative array. That would have be something that, when you 
foreach on it, the keys (which in fact hold the valuable 
material) come in order, such as in

assarr("alice")=12
assarr("bob")=0
assarr("charlie")=7

but I guess that's not really the point with associative arrays 
and that their in-memory location is somewhat random, maybe for a 
reason.


> the Phobos sort function of std.algorithm
I still hope I'll survive 'till I get there ;-)

thanks a lot


More information about the Digitalmars-d-learn mailing list