On Friday, 8 June 2012 at 18:49:42 UTC, Nathan M. Swan wrote:

It seems like you're confusing _associative_ arrays with _regular_ arrays; they are different things.

A regular array is written as T[], or an array of Ts.
An associative array is written as K[V], or a map from K to V.

If you have a list of something, use string[], not string[ulong].

I'd consider the Associative Array with any numeric key as a sparse array; Course like that you wouldn't get them in any particular order... And most of the time you wouldn't need to.

I've found all kinds of interesting uses for numeric based AA's, one of them is one of my examples of an expanding prime number-generating range, another could be for a COW (Copy-on-write) based array; Reminds me I'll write a struct for one if there isn't one yet.

Reply via email to