Closed richierocks closed 3 years ago
I don't think it's a problem that the verb clashes with the kind of interpolation done by approx()
though.
@lionel- "interpolate" isn't a terrible verb; but again, it's 4 syllables, and I don't think it provides much intuition about what is happening. If you really love it, then fine, but I think it's worth at least trying to come up with something better.
I agree that an easy to say/remember term would help for teaching this operator! I started a thread about it on Twitter, but none of the suggestions so far jump out as perfect: https://twitter.com/JonTheGeek/status/1144815369766547456?s=19
To be clear, I don't think it's wrong as-is or anything like that, but a memorable way to say it definitely makes it easier to learn/teach.
From that thread, I like "embrace" and "hug" the best.
I don't love it and I think it's worth trying to come up with something better.
For the moment interpolation seems the best and has a good synergy with glue vocabulary. It also seems to make a good contrast with templating, see http://rpubs.com/lionel-/superstache.
Embrace and hug are cute but, like curly-curly, do not convey any meaning regarding what is going on.
Other possibility: forward operator.
I'm not sure why I didn't start with https://www.thesaurus.com/browse/interpolate before, but there is also "admit", "allude", "carry", "dock", "inject, "inlay", "inset", "interject", "mediate", "place", "thrust", and "tuck".
‘Rebrace’ (replace, with more braces)?
Whatever it’s called, I think it’s a great addition to the tidyeval syntax!
"Tunnelling" data-variables through env-variables.
Still not sure how to call it 😅
The quasiquotation help page calls
{{ }}
"interpolation", but that's a little confusing because interpolation has another, more common, meaning (it's whatapprox()
does).The internal code calls
{{ }}
"curly-curly", but 4 syllables is too much to say out loud, and risks being shortened to "curlies", which is borderline rude.So I think it's worth trying to come up with a better name before a bad one sticks.
This is hard, but here are a few possibilities to get started thinking about it.
Synonyms for surrogate
Since the behavior of the operator is a bit like
substitute()
, it's worth thinking of synonyms for that word.I quite like "surrogate", but "relief" and "broker" are other options.
Words related to scoping
Since the point of the operation is to change the scope of where the variable is being evaluated, "rescope" might work. "Enclose" is another possibility which nicely sounds like "enquo".
Words related to relocation
On a similar note, "migrate" or "transplant" help focus the attention on the fact the you're moving a variable from one environment to another.
Words related to quoting
Since the operation does quoting and unquoting, a word related to quoting might be appropriate. Perhaps "retell" or "recollect". I also really like "parrot", which feels memorable.
Wording related to finding
You could use an analogy of this operator finding variables. Most of the appropriate words already have some other meaning, but I quite like "sniff" and "ferret".
Wording that describe the shape
Although curly-curly is cumbersome to say, it does make it clear what you are supposed to type. One quicker-to-say alternative is "seagulls", since a curly brace looks a bit like a seagull.
I'm out of ideas for now, but I'm sure there are more.