In order to avoid having my packages import rlang into the namespace I try to qualify function calls with rlang::
. This is fine for rlang::enquo()
but gets ugly quickly for rlang::UQ()
.
I was playing around with this today and it seems there's no need to qualify calls to quasiquotation functions because they only ever get evaluated by an rlang function.
At least, I think that's why this works on a fresh R session:
> rlang::exprs(!!rlang::expr(foo))
[[1]]
foo
I think the same logic applies to these operators: !!qoo
, !!!qoos
, .data$foo
, a := b
.
Am I safe to use these operators, unqualified, within my packages?
Incidentially, this would be one argument not to support rlang::.data$foo
(see dplyr issue 2930).