# Is association in mathematica ordered or not? [duplicate]

Does the association <|a -> 1, b -> 2, c -> 3|> in Mathematica have order or not? If I iterate the association multiple times, is it guaranteed that the items will be iterated in the same order?

• I have not used association much, but for me, it makes little sense to talk about "order" of keys. The point is that one gives a key, and gets the value associated with that key by a lookup. Like a hash table. If you depend on an "order" of keys in the lookup table to do something, then I think you are doing something wrong. – Nasser Apr 5 '15 at 7:53
• @Nasser: It's not the most frequent use case, but sometimes you want to aggregate data in an Association, then later process the key/value pairs in the order they were discovered. And I often find it handy that BarChart, ListPlot&friends don't jumble association data I pass them. So I'm glad Wolfram made them ordered. – Niki Estner Apr 5 '15 at 11:35
• @nikie Thanks for clarification :) – m00nlight Apr 6 '15 at 12:31