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

Generic Implementation #88

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Conversation

jwriteclub
Copy link

Adds to @suhlig's PR by adding an A (for Arguments) parameter, so that the type of actions and guards can be fully type specified.

Also added an "Args" helper type, that preserves the old behavior of using reflect.TypeOf in order to do dynamic typing if desired.

I'm not certain that I fully like this implementation, or that the addition of having typing for the arguments outweighs the relative added complexity of smuggling an "A" around all over the code. On the other hand, for the typical kind of application I've been using stateless for, I often have the same or a very similar argument for all the times I actually need an argument, and nothing at all the rest of the time.

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

Successfully merging this pull request may close these issues.

2 participants