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

Can we find a way to infer Args(0) CaptureArgs(0) for Chained #103

Open
jjn1056 opened this issue Jul 17, 2015 · 1 comment
Open

Can we find a way to infer Args(0) CaptureArgs(0) for Chained #103

jjn1056 opened this issue Jul 17, 2015 · 1 comment
Labels
Milestone

Comments

@jjn1056
Copy link
Member

jjn1056 commented Jul 17, 2015

One thing about chained actions that seems to make things hard for people is that it is a bit on the verbose side. One thought is to do a better job inferring a value for Args / Captures in the case when that attribute is not defined. The suggestion:

When an action is not the last action in the chain, omitting CaptureArgs is the same as saying CaptureArgs(0).

When the action is the last in the Chain, we infer 'Args' as the final value. I think this is correct since for Path and Local actions we infer Args in the dispatcher so its consistent.

Question

Would we prefer to infer Args(0) over Args for the final? Looking over my code that seems to be more common, although it might just be a side effect of the fact I need to put Args there to signify 'end of chain'

@jjn1056 jjn1056 added this to the orpington milestone Jul 17, 2015
@xmikew
Copy link

xmikew commented Aug 29, 2015

:Args(0) is much more common for me. I don't think I've ever used :Args. I personally don't have a lot of use cases for passing in a variable number of path parts. It also seems to be more consistent with the :CaptureArgs(0) logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants