vctrs
vctrs copied to clipboard
Fix `vec_is()` by comparing ptypes
We could make vec_is()
generic by requiring the result of vec_ptype()
to only contain essential attributes. Methods for vec_ptype()
would need to remove any details attributes. Ideally they'd just return a static ptype. vec_is()
would then compare the ptypes with identical()
.
vec_ptype()
is already generic, although it is currently documented as a only a performance generic. Here we are considering giving it a specific role in the genericity API of vctrs.