Skip to content

Conversation

@lionel-
Copy link
Member

@lionel- lionel- commented Jan 11, 2017

Includes #16 and #17.

with this patch instead of:

foo <- "bar"
var1 <- ~foo
var2 <- local({ foo <- "baz"; ~foo })
f_quote(list(!!var1, !!var2))
#> ~list(foo, `_P`(~foo))

we have:

f_quote(list(!!var1, !!var2))
#> ~list(foo, ~foo)

This should make things much more readable when debugging capturing code. The formulas self-evaluate within f_eval():

f_eval(f)
#> [[1]]
#> [1] "bar"
#>
#> [[2]]
#> [1] "baz"

- find_data() becomes a generic data_source() constructor
- `complain` class renamed to `data_source`
- Inline them when the formula env is not infomative (formula contains a
  constant, f_env() is the same as surrounding f_env(), or f_env() is
  the empty environment).

- Replace them with a promise guard when env is informative. These are
  function calls that wrap a formula, e.g. `_P(~expr)`. They are
  defined in the evaluation env and take care of forwarding pronouns
  and dynamic data.
We're going to interpolate only during capture.
@lionel- lionel- closed this Jan 19, 2017
@lionel- lionel- deleted the feature-tilde-self-eval branch September 22, 2018 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant