3 ms·
Because "don't" is easier to read than 'don\'t'
by Teongot 5y ago
Because "don't" is easier to read than 'don\'t'
- JackFr 5y agoWhen you’re embedding SQL in a string, a you use ‘ a lot more than “. Not the only use case, but one to give some consideration.
- throwaway894345 5y agoI think that’s only MySQL. Postgres uses double quotes for identifiers and single quotes for literals. EDIT: I misinterpreted that single quote as a backtick. In any case, both single and double quotes are common in SQL, but single quotes are a bit more common.
- iqanq 5y agoAnd 'do not' is easier to read than both :)
- shpx 5y agoBlack will use single quotes if your string contains double quotes and no single quotes. It'll reformat print("\"Hello\" he said") to print('"Hello" he said') I think pretty much all formatters for languages that let you use either quote do this. It makes sense.
- JimDabell 5y agoIf you use proper apostrophes instead of ASCII apostrophe / single quote, you don’t have to escape anything and you get better typography. "don’t" is easier to read than both. If you’re on a Mac, Option-Shift-] will type it.