Re: [Rd] String interpolation [Was: string concatenation operator (revisited)]

2021-12-07 Thread Taras Zakharko
> I don't think a custom type alone would work, because users would expect to > use such string anywhere a regular string can be used, and that's where the > problems start - the evaluation would have to happen at a point where it is > not expected since we can assume today that CHAR() doesn't

Re: [Rd] String interpolation [Was: string concatenation operator (revisited)]

2021-12-07 Thread Kevin Ushey
For what it's worth, you can also get 90% of the way there with: f <- glue::glue f("if you squint, this is a Python f-string") Having this in an add-on package also makes it much easier to change in response to user feedback; R packages have more freedom to make backwards-incompatible

[Rd] String interpolation [Was: string concatenation operator (revisited)]

2021-12-07 Thread Simon Urbanek
I don't think a custom type alone would work, because users would expect to use such string anywhere a regular string can be used, and that's where the problems start - the evaluation would have to happen at a point where it is not expected since we can assume today that CHAR() doesn't