Standard: Consider allowing template literals as a default

Created on 15 Sep 2016  路  2Comments  路  Source: standard/standard

Ref: https://ponyfoo.com/articles/template-literals-strictly-better-strings

Right now, if you use a template literal without interpolation, it's an error.

Most helpful comment

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.

All 2 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

feross picture feross  路  3Comments

Alexsey picture Alexsey  路  3Comments

rbecheras picture rbecheras  路  3Comments

christianalfoni picture christianalfoni  路  3Comments

ghost picture ghost  路  3Comments