go-ordered-map icon indicating copy to clipboard operation
go-ordered-map copied to clipboard

Is it safe to compare with reflect.DeepEqual?

Open derelbenkoenig opened this issue 9 months ago • 0 comments

If I had two OrderedMaps, which contain the same elements with the same insertion order, but which were created by different sequences of actions, then those should be equal in an abstract sense. But will they actually have the same underlying data structure?

For example if one was created by inserting 1, 2, and 4; and another was created by inserting 1, 2, 3, and 4, then removing 3, or by inserting 1,4, and 2, and then using MoveBefore to put 2 before 4.

derelbenkoenig avatar May 03 '24 20:05 derelbenkoenig