This is a reimplementation of
vctrs::s3_register(), implemented here
to avoid having to take a dependency on vctrs.
s3_register(generic, class, method = NULL)
Name of the generic in the form
Name of the class
Optionally, the implementation of the method. By default,
this will be found by looking for a function called
in the package environment.
Note that providing
method can be dangerous if you use
devtools. When the namespace of the method is reloaded by
devtools::load_all(), the function will keep inheriting from
the old namespace. This might cause crashes because of dangling
NULL, called for side effects.