elliotchance / orderedmap

🔃 An ordered map in Go with amortized O(1) for Set, Get, Delete and Len.
MIT License
817 stars 62 forks source link

Require comparable interface instead of constraints.Ordered for map keys #29

Closed MagnaboscoL closed 1 year ago

MagnaboscoL commented 1 year ago

Hello, nice package. Maybe I am wrong but I don't see the added value of constraining the key type using constraints.Ordered.

Without this constraint this map could be "a drop in replacement" for the standard map type when the user is interested in preserving the insertion order.


This change is Reviewable