A colon indicates a character. I would not call it bad practice as well as unconventional practice, which could make the code a little more difficult to understand.
I know that :"Some weird stuff" is legal, but he doesn’t like it, personally I would prefer to use :Some_weird_stuff and leave the quotes all together - using quotes when you don’t just need to add noise - I am very anti-noise. Noise is bad practice, so understanding takes more time.
Sometimes, when you match things that go into strings, but for consistency you want to use characters, you don't have much choice, but I prefer not to ask this question, FWIW.
When you have syntactically pure characters, you can use
{ thing: "value" }
syntax that is joy and very clear and uncluttered.
Interestingly, however:
irb > class String ; def to_sym ; puts "bob" ; end ; end => nil > "fred".to_sym bob => nil > :"fred" => :fred
Boris point is valid.
Ghoti source share