Backtick-delimited strings for quote-intense strings (i.e. JSON) #4222
Replies: 4 comments 7 replies
-
Where is the tilde But you're right that it types nicer than |
Beta Was this translation helpful? Give feedback.
-
I don't think the suggested requirement of having the interpolated expressions be prefixed with var arg = "bar";
var str1 = $`foo: ${arg}`;
var str2 = $"foo: ${arg}"; |
Beta Was this translation helpful? Give feedback.
-
I really hate when the backtick is used, simply because there is no backtick on my keyboard. |
Beta Was this translation helpful? Give feedback.
-
Generally, using interpolation to declare json is not a good idea. It's very likely to cause escaping problems. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Example (like JavaScript's string interpolation):
Note that it would be nice if string interpolation in this mode is default and needs to have a
$
prefix for the LHS{
, to allow declaring JSON cleanly in code.Beta Was this translation helpful? Give feedback.
All reactions