Double quotes vs single quotes

As a coder, you are often faced with the conundrum. Do I choose single quotes or double quotes?

Alas, in some languages, single quote is reserved for defining single characters only but other languages give you the options of using either. Sometimes double quotes imply variable interpolation, but you shouldn’t be bothering with that anyway. Single quote is better than double quote for the following reason that you don’t Have to hold shift to type a single quote.

1 thought on “Double quotes vs single quotes”

  1. Double quotes for user facing strings. Reason: easier to extract for i18n, or even to understand what is and isn’t ultimately shown.

Leave a Reply

Your email address will not be published. Required fields are marked *


*