ruby-formatter/rufo

Double quotes ?

Closed this issue · 3 comments

Hi,

New to rufo, I can see that string surrounded by simple quotes are turned into double quotes surrounded ones ?

As I remembered, simple quotes string are less resource consuming if there is no interpolation in it, right ?

Regards,

glebm commented

Not sure whether there is a performance benefit but it's less mental overhead - if I see a single-quoted string I know it won't have any interpolations / escape sequences

Check this out!! After all it's a decision about performance: https://anti-pattern.com/always-use-double-quoted-strings-in-ruby