-
Notifications
You must be signed in to change notification settings - Fork 293
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
Adding support for Tuple<T1, T2, ...> as option/value parsing target #182
Comments
This seems to go against the standard. To have it accepted you would have to quote the |
@mizipzor, I'm not agree, why one have to quote input? In this case just think a tuple like a heterogeneous typed sequence. As long as I think it's good also for forcing an order without effort. E.g. Probably will complicate the parsing kernel, but I thik it could be useful for some scenarios. Obviously it's a feature that must be used correctly like in my sample. E.g.: if I want capture exactly 10 |
My only argument is that its simply not how the original getopt works, to have spaces you either quote them or escape them. As long as that is still required I have nothing against adding support for tuples. People know getopt and having the library behave like getopt is a feature (and a good one at that). If the library works "like getopt with a few tweaks", it is not as attractive. |
The only benefit I can see here is the ability to specify multiple tuple options in a single argument string, otherwise there doesn't seem to be much benefit over using a Verb with ValueAttributes: Additionally, this syntax maps a single Maybe one compromise could be to let the Another option, slightly more verbose, could be to add the ability to define "option groups" that require all options in the group to be defined or none at all:
Personally, I agree with @mizipzor that keeping consistency with getopt is a very good thing (especially now that C# is becoming more cross-platform) and for this particular example adding a colon separator ( |
@nemec, thanks for comments! Personally I see a A true thing instead is that two Any other comment? |
No more comments, I've said my part and still hold the same opinion. |
I want to be able to parse this:
to:
Opinions? cc/ @mizipzor @nemec @gimmemoore
The text was updated successfully, but these errors were encountered: