Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Circular Buffer comparable type with any or similar #10

Open
maestre3d opened this issue Feb 14, 2024 · 2 comments
Open

Replace Circular Buffer comparable type with any or similar #10

maestre3d opened this issue Feb 14, 2024 · 2 comments

Comments

@maestre3d
Copy link

maestre3d commented Feb 14, 2024

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.

@sleepymole
Copy link

I have a similar thought in emirpasic#243.

@sleepymole
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants