-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
Use generics for State and Trigger #34
Comments
I've been playing with type parameters since the beginning, but I'm still not sure if they are a good addition to this library. Anyway, you can try them by pointing to typeparams branch and check the diffs at #35. If you do so, please report back with your experience! |
I ended up coding a state machine implementation from scratch with a generic input argument. See https://github.com/soypat/go-maquina. Wondering if maybe there's room for a related projects section in the readme to point users to this smaller state machine implementation? |
@qmuntal adding generic support would be quite valuable. Are you still open to contributing this to the lib? I'm exploring options for statechart libraries and type safety for states and triggers would be a meaningful benefit. |
I am proposing an updated version in #35 (comment) |
Go 1.18 official release brings Generics to the table!
The text was updated successfully, but these errors were encountered: