Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻️ Drop template literal syntax and just always allow interpolation in strings. #108

Open
hayleigh-dot-dev opened this issue Mar 11, 2022 · 1 comment

Comments

@hayleigh-dot-dev
Copy link
Contributor

Although the initial motivation was just copying what JS does, it doesn't really seem clear to me if there's any benefit to having different syntax at all and only serves to make things more awkward (eg can't easily refactor console logs without changing the surrounding quotes).

I don't think we stand much, if anything, to lose here by assimilating the two and just requiring users to escape $ if they want that literal character.

@sdegueldre
Copy link

$ is not that rare in strings, I'd suggest requiring escaping either character in ${ instead, such that "this costs $50" doesn't require escaping (this is also how it works in JS so that would preserve the original semantics)

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

No branches or pull requests

2 participants