Skip to content

Generic Implementation#88

Draft
jwriteclub wants to merge 4 commits intoqmuntal:masterfrom
jwriteclub:generic
Draft

Generic Implementation#88
jwriteclub wants to merge 4 commits intoqmuntal:masterfrom
jwriteclub:generic

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