r-lib / rlang

Low-level API for programming with R
https://rlang.r-lib.org
Other
509 stars 138 forks source link

Should name-unquoting work everywhere in the AST? #279

Open lionel- opened 7 years ago

lionel- commented 7 years ago
expr(c(!! "foo" := 1))
lionel- commented 6 years ago

We are currently taking the approach that name-unquoting is a property of tidy dots rather than tidy eval. So it only works at top-level, e.g. list2(!!nm := foo) and exprs(!!nm := foo).

lionel- commented 4 years ago

We want to revisit this. One problem with this approach is that this will prevent using QQ to program on the language with data.table-like interfaces, because := will be transformed to =.

lionel- commented 3 years ago

We can just preserve := calls when their LHS does not use injection.