-
-
Notifications
You must be signed in to change notification settings - Fork 347
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
keyword argument aliases and pluralization #15
Comments
Part 1 is done... still need to address "Could also take this opportunity to do away with the pluralized form (or at least map AbstractVector inputs to the pluralized form automatically)" |
On this same note, I think it would be nice to have a preliminary layer which converts alternative names into the "one true name" for keyword keys and values. So for example:
Then syntax could be super short:
The one gotcha to look out for... if I want to pass an array of colors for one series (say, for a colorscheme), then I need a way to pass in an array and have it be treated as a single value by the "renaming layer". This is the single most important reason that I still have explicit pluralized arguments. With a good solution I will merge plural and singular versions so they both do the same thing. |
A clunky solution would be to require the user to wrap "array values" explicitly if the whole array should be applied to one series. So then:
In the 1st and 2nd cases, the odd series would get the one color red while the even series would get the one color blue. In the 3rd case, all series would get the full vector of [red,blue] |
Use
mod1(argOptions)
to cycle through the choices. Current behavior shouldn't change, but you could, for example, do:And it would alternate between the styles... 5 solid, 5 dash.
Could also take this opportunity to do away with the pluralized form (or at least map AbstractVector inputs to the pluralized form automatically).
The text was updated successfully, but these errors were encountered: