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

Add quosure methods for operators #478

Closed
lionel- opened this issue Apr 5, 2018 · 4 comments
Closed

Add quosure methods for operators #478

lionel- opened this issue Apr 5, 2018 · 4 comments
Labels

Comments

@lionel-
Copy link
Member

lionel- commented Apr 5, 2018

To fail appropriately when omitting to unquote, c.f. tidyverse/dplyr#3476 (comment)

Once we're able to return typed expressions from expr() / enexpr() etc, would be a good idea to implement the method as well.

cc @romainfrancois

@romainfrancois
Copy link
Contributor

Should we instead investigate if this makes sense in R in the first place ?

@lionel-
Copy link
Member Author

lionel- commented Apr 5, 2018

What do you mean?

@romainfrancois
Copy link
Contributor

Yeah sorry that was not clear at all.

There's two things I guess:

  • defining the s3 methods on quosure objects, so that independently of their implementation we would be protected from the original problem
  • investigate why things like this happen in R in the first place, does it make sense, and if not should we negotiate to fix it
> f <- ~x
> f > 2
[1] FALSE
> f < 2
[1] TRUE

@lionel-
Copy link
Member Author

lionel- commented Apr 5, 2018

Expressions are deparsed for comparison. I think it should be forbidden but that probably won't happen. R core people likely won't find this to be a big issue and they will prefer not to risk breaking code.

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

2 participants