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

Use (<>) instead of (&) in documentation #37

Closed
Gabriella439 opened this issue Dec 7, 2012 · 2 comments
Closed

Use (<>) instead of (&) in documentation #37

Gabriella439 opened this issue Dec 7, 2012 · 2 comments

Comments

@Gabriella439
Copy link

This kind of an issue of style, but I think it would be less confusing if you changed the documentation to use (<>) instead of (&). That's one less combinator to learn, and it also makes it more obvious to users that options are monoids, so that they know they can use other monoid combinators like mconcat to collect options.

You don't really need to remove the (&) combinator if you are worried about backwards compatibility, although my understanding is that the libraries mailing list has been discussing appropriating (&) for postfix function application.

@dag
Copy link
Contributor

dag commented Dec 8, 2012

The reason & is even there is that option modifiers used to be a Category, with & as an alias for >>>. It's not really needed any more since <> is nice enough itself and doesn't conflict with anything in the Prelude, so it's only kept for backwards compatibility I think. On the other hand, it is trivial to port code to use <> instead, so maybe & should go?

:%s/ &\b/<>/g

@UnkindPartition
Copy link

& is still mentioned in the Options.Applicative.Builder module documentation.

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

4 participants