-
Notifications
You must be signed in to change notification settings - Fork 135
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
Also support maps as arguments when public APIs use trailing map args #59
Comments
Sounds good. |
Going to give this a try this w/e. |
michaelklishin
added a commit
that referenced
this issue
Apr 5, 2014
….rest.document References #59.
michaelklishin
added a commit
that referenced
this issue
Apr 6, 2014
Should be fixed in master, will be in |
Thanks. This is awesome. |
michaelklishin
added a commit
that referenced
this issue
Apr 7, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There's some APIs in elastisch that support trailing named arguments. For instance native.document.search
This is handy when I'm directly calling search, ala
but is a PITA when trying to interact with search from another method that takes options. For instance, if I wanted to have a search method that I want to take a query and filter option, I end up having to write awkward code like:
Rather than start my whole rant against hating the trailing named argument pattern (versus just passing a map), I'm asking here that when elastisch supports trailing named arguments it also supports passing them in as a map.
There may be a clojure pattern that makes this easier that I'm unaware of, but on the receiving side this the following works:
I'm aware throwing that if in all over the place is annoying, but such is the world of trailing named args.
The text was updated successfully, but these errors were encountered: