Suggestion: syntax for non-standard string literals
Open
meta-proposal
theme-internals
theme-parser
type-design
- Dominant language
- Rust
- Stars
- 145
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
One could define a function to operate on a single string like so:
``` r
`g"` <- function(x) {
glue::glue(x, .envir = parent.frame())
}
```
This would basically give you something very similar to Python's f-strings:
``` r
g"1 + 1 = {1 + 1}"
#> [1] "1 + 1 = 2"
```
Obviously, the {glue} package isn't available in this version of R, but you get the idea 😄
This idea comes from Julia, which lets you define non-standard string literals in the same way: .
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.