Ref: https://ponyfoo.com/articles/template-literals-strictly-better-strings
Right now, if you use a template literal without interpolation, it's an error.
Thanks for the suggestion. That's an interesting blog post.
Whenever there are multiple ways of doing something聽in JS, standard usually enforces only one way to prevent style arguments. Allowing either backtick (`) or single quote (') for strings would be a step back.
So, what about making backticks (`) the default over single quotes (')? That's hugely disruptive and don't see it ever happening. But before that could even be considered, ES6 would need to be so widely adopted that there's no need for a transpiler in 95% of browsers. Because we can't add a rule that effectively mandates that people use babel in their codebases.
Hope this makes sense! I'm going to close this, but feel free to continue discussion.
I love the idea, but you're right, its just not practical.... yet.
Maybe standard@15
Most helpful comment
Thanks for the suggestion. That's an interesting blog post.
Whenever there are multiple ways of doing something聽in JS,
standardusually enforces only one way to prevent style arguments. Allowing either backtick (`) or single quote (') for strings would be a step back.So, what about making backticks (`) the default over single quotes (')? That's hugely disruptive and don't see it ever happening. But before that could even be considered, ES6 would need to be so widely adopted that there's no need for a transpiler in 95% of browsers. Because we can't add a rule that effectively mandates that people use babel in their codebases.
Hope this makes sense! I'm going to close this, but feel free to continue discussion.