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

Overhaul options #11

Open
fehrenbach opened this issue Jun 9, 2018 · 0 comments
Open

Overhaul options #11

fehrenbach opened this issue Jun 9, 2018 · 0 comments

Comments

@fehrenbach
Copy link
Owner

Lots of functions take options like limit that do not affect the shape of the result. These should always be exposed.

Other options, like include_docs "change" the result type. Currently we have separate functions for these. It would be good to have a more consistent naming scheme. Or we could do type-level trickery to make the return type dependent on the options (turn Booleans into present/not present). This would probably be bad for inference though, if we don't need the result and don't pass the option, the type would be ambiguous.

Also, mutually exclusive options: key and keys and (startkey or endkey). I think these could be expressed with type-level trickery and no ill effects.

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

1 participant