-
Notifications
You must be signed in to change notification settings - Fork 32
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
Dispatching on "missing" #67
Comments
Is there an advantage over providing |
One example is |
I strongly agree with @lawremi : R like optional arguments make sense a lot. Indexing (and subsetting, i.e., the |
I think this is a confusing API (since you can't tell from the function formals which arguments are required and which are optional), but it seems like we'll need it for backward compatibility. |
Having this information gives us the opportunity to automatically clarify argument handling in the generic documentation, so that we do not have to depend on the formals and the presence of a default value to communicate optionality. |
Any syntax preferences for this? We could use (It looks like method dispatch for missing arguments is already implemented, but method registration is not.) |
For consistency, what about making something like |
Yeah, sorry that's what I meant by "special symbol". Does |
|
Also need to implement/test dispatch on "ANY", which I think might have gotten muddled up with dispatch on |
What do you think of "absent" instead of "missing"? It avoids some of the confusion associated with And I think maybe |
I've gone with |
S4 lets us dispatch on "missing", i.e., an argument in the signature not being provided. This is a somewhat useful feature for multiple dispatch. Should/could we support that in R7?
The text was updated successfully, but these errors were encountered: