-
Notifications
You must be signed in to change notification settings - Fork 34
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
export class_inherits()
?
#431
Comments
Should we pick a different name? Currently, we have a strong convention that symbols with a > grep("^class_", getNamespaceExports("S7"), value = T)
[1] "class_POSIXct" "class_environment" "class_integer" "class_Date"
[5] "class_name" "class_double" "class_formula" "class_POSIXlt"
[9] "class_missing" "class_character" "class_language" "class_complex"
[13] "class_function" "class_list" "class_POSIXt" "class_vector"
[17] "class_factor" "class_call" "class_array" "class_numeric"
[21] "class_atomic" "class_expression" "class_matrix" "class_raw"
[25] "class_logical" "class_data.frame" "class_any" |
This comment was marked as off-topic.
This comment was marked as off-topic.
A new name would be a good idea. Perhaps just |
Hi the utility function would definitely by handy if it got exported. Because you encounter it when defining your own container property where you need to test the type of child elements. |
class_inherits()
is a useful utility for checking whether an object satisfies a class specification. I use the term specification, because I am not sure things like a class union orclass_any
are really classes (both are types of unions). But the fact that it's a specification makes it different frominherits()
.Should we export it? The name seems OK. In fact, it's better than
inherits()
, because objects do not inherit, classes do.We could also use something like
class_satisfies()
to distinguish it frominherits()
.The text was updated successfully, but these errors were encountered: