ugurcsen/gods-generic

Replace Circular Buffer comparable type with any or similar

maestre3d opened this issue · 2 comments

Is your feature request related to a problem? Please describe.
I want to use a circular buffer with a custom struct. Nevertheless, I found myself in a problem as the circular buffer interface requires a comparable type. My struct is not comparable so I can't use this data structure at all.

Describe the solution you'd like
I would like that we consider replacing comparable with any or similar to avoid these kind of issues. AFAIK, we don't need comparable for a buffer ring case. At least not for the main functionalities for this data structure.

Describe alternatives you've considered
Right now, the only alternative is using the GoDS legacy lib as it uses the interface{} type.

Additional context
Add any other context or screenshots about the feature request here.

I have a similar thought in emirpasic#243.

I have submitted a PR emirpasic#244 to emirpasic/gods.