-
Notifications
You must be signed in to change notification settings - Fork 17
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
remove generic Timer struct's State parameter #102
Comments
I'll give this a look. |
Hi, I have given this a look and we stand between 2 choices: Either one has type states which is nice for compile time checking but cumbersome to use in runtime and place in structs, One can also wrap the timer object in an enum, where each enum variant maps to a state. What are your thoughts on the @PTaylor-us ? |
@korken89 I think the issues brought up with the current type-state scheme are serious enough to switch over to runtime checks. I like the elegance of the type states, but it's just not a good fit for this situation. So I think storing an enum state in the timer is a good way to go. |
@korken89 Have you already done any work on this? I may want to work on it, but don't want to duplicate effort. |
Unfortunately not, I became a dad recently so my contributions to open source projects is currently on hold for a while longer. :) |
Ref: #75
The State type parameter means that a Timer that is going to change state cannot be (nicely) stored in a struct.
Does the Type type parameter also block some use cases?
The text was updated successfully, but these errors were encountered: