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

Would it make sense to default arg-parser to #'identity? #18

Open
kat-co opened this issue Oct 28, 2019 · 2 comments
Open

Would it make sense to default arg-parser to #'identity? #18

kat-co opened this issue Oct 28, 2019 · 2 comments

Comments

@kat-co
Copy link

kat-co commented Oct 28, 2019

This seems like the expected behavior in most flag libraries, and also the most common use-case.

@vindarel
Copy link
Contributor

vindarel commented Nov 6, 2019

mmh the default behavior is an option that doesn't take an argument, such as

    (:name :version
           :long "version"
           :description "Print version and exit.")

we add :arg-parser only when we expect one. So we need to give a parser name. I don't see, with this semantic, how we can inform :arg-parser to default to identity. Maybe :parse-option t, and :arg-parser would come as a complement ?

@libre-man
Copy link
Owner

I think it is better to be a bit more explicit about this, also as they mean quite different things. I don't really like the idea of allowing t as an alias for #'identity, it isn't that much shorter and you probably and you will probably forget what the t stands for every time you encounter it. What about warning when a option has a meta-var set but not a arg-parser?

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

No branches or pull requests

3 participants