Add a function futurize_apply_to_package() that can be used in a package's .onLoad() to apply all futurize() transpilations on package load, e.g.
.onLoad <- function(libname, pkgname) {
futurize::futurize_apply_to_package()
}
Special care has to be take for arguments such as when and eval.
Benefits
- It removes the tiny overhead of the
futurize() transpiler that otherwise applies at each call.
- It validates that all
futurize() transpilations are valid up front.
- ...?