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

Replace g3_with -> local() #90

Open
lentinj opened this issue Nov 22, 2022 · 0 comments
Open

Replace g3_with -> local() #90

lentinj opened this issue Nov 22, 2022 · 0 comments

Comments

@lentinj
Copy link
Collaborator

lentinj commented Nov 22, 2022

To be able to split of formula_utils, we need to have something that's actual R in place of g3_with.

local() is the obvious candidate, replacing g3_with(var1 := val1, var2 := val2, { stock__num <- var1 * var2 }) with local({var1 <- val1 ; var2 <- val2 ; stock__num <<- var1 * var2}).

However, this isn't brilliant since assignments to stock__num outside of local() will still have to use <-. Remembering which to use sounds painful.

There's also a performance concern about all the extra environments, but this could be rewritten out if required.

lentinj added a commit that referenced this issue Nov 22, 2022
To make it more obvious what a replacement may need to do, make
g3_with_extract_terms more rigid in what it accepts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant