I don’t think there is a strong convention in the whole community. From what I saw, there seems to be a bias towards ignoring single quotes in general and always using double quotes. In some circles, this is even a convention, but a localized one, and not one for the entire community.
Personally, whenever I have several different ways to express the same thing, I tend to use these different ways to convey different semantics. (For example, I use curly braces against do / end in blocks to distinguish between blocks that are used for their side effects and blocks that are used for their return value.)
So, I only use double quotes when I really want to use string interpolation or escaping, otherwise I use single quotes. Thus, when I see the line, I can immediately say that there is no funny thing, and there is no hidden code inside it.
I am pragmatic. I prefer "It a string!" more 'It\ a string!' or %q[It a string!] .
Jörg W Mittag
source share