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

ListenerHandle should have been an alias for uint64_t #5

Open
KyrietS opened this issue Feb 24, 2024 · 1 comment
Open

ListenerHandle should have been an alias for uint64_t #5

KyrietS opened this issue Feb 24, 2024 · 1 comment
Assignees
Labels
improvement Code refactor or minor changes that are not new features

Comments

@KyrietS
Copy link
Owner

KyrietS commented Feb 24, 2024

I don't exactly know why I decided to make ListenerHandler as a custom struct. It doesn't make sense and I think it should be an uint64_t for the sake of simplicity.

(maybe some time ago I probably wanted a RAII "token" that would remove the listener automatically)

@KyrietS KyrietS added the improvement Code refactor or minor changes that are not new features label Feb 24, 2024
@KyrietS KyrietS self-assigned this Feb 24, 2024
@KyrietS
Copy link
Owner Author

KyrietS commented Feb 24, 2024

Now I remember. I wanted to have strong-immutable-type for a handler. Using uint64_t would mean that it is just a number without any meaning. Not sure what would be better for a user, have a restrictive ListenerHandler that won't let anyone destroy the value or a simple number and let people handle it however they want...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Code refactor or minor changes that are not new features
Projects
None yet
Development

No branches or pull requests

1 participant