Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Atlas1174637yIn php I prefer double quotes because I'm too lazy to escape strings to concat variables. Bonus: I feel it makes the code more readable (or as readable as my codes get)
-
I try to use whichever occurs less in the actual text I will be using in that app (which I guess mostly applies to front end). So I switch based on content and then get confused when I go back to languages that require double quote 😔
-
'Single' or $mystring$dollar$mystring$ - only possible choices in language I use and I like both. Double quotes are reserved for naming identifiers, sort of like object names.
-
css:after {
content:'hello';
}
but print("world") - in any other programming/scripting language -
thoxx19777ydepends, in some languages single quotes identify a single character and double quotes a string
char = 'A'
string = "ABC" -
Whichever requires less escaping. Except when they're nested then the preference is just to get it working and move on.
-
Idgaf. I download the standard style on my editor and set it to prettify on save. Then I type however the heck I feel like that day.
Usually double quotes though, since it's the standard for strings.
Related Rants
For strings: single quotes or double quotes?
Which ones do you prefer?
question
opinions
quotes
preferences