|
|
|
|
|
by cptn_badass
2039 days ago
|
|
Double quotes allow you to do string interpolation, which is not possible with single quotes. So I assume one faction argues that everything should be double quoted because it's does not matter if there's interpolation or not, while the other group would rather only use double quotes when necessary, otherwise use single quotes. I'm personally part of the second group simply because my linter forced it, but at the end of the day, it's such a low impact we don't really care. |
|
So in that case, they're not used randomly according to the individual user's preference. There's a consistent rule. It's helpful for readability, too. And not sure about Rubocop in Ruby, but many linters in other languages can pick up on these different applications.