Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transition quosures away from formulas #1145

Open
lionel- opened this issue Mar 30, 2021 · 0 comments
Open

Transition quosures away from formulas #1145

lionel- opened this issue Mar 30, 2021 · 0 comments
Labels
Milestone

Comments

@lionel-
Copy link
Member

lionel- commented Mar 30, 2021

We could replace formulas by rlang::q(expr, <env>) calls (or rlang::q(expr) if we store the env in attributes like with formulas, but I like @brodieG's idea of leaving it apparent in the call, see https://www.brodieg.com/2020/08/11/quosures/).

  • With R 4.1 and primitive :: we no longer have a significant overhead to using ::. IIRC this one of the reasons we went for formulas at the time.
  • This would fix obscure corner cases eval_tidy() with ... in two-sided formula #1124
  • Quosures can then be evaluated with eval(), Rf_eval(), or eval_bare(). We no longer need a "quosure mask" when data is not supplied (a mask with a single ~ binding). Then return(), sys.frame(), etc. will work correctly.
  • We have abstracted quosures internals with quo_get_expr() and quo_get_env() so the transition should not be too harsh.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant