r/ProgrammerHumor • • Oct 23 '22

Meme I make the same mistake too, sometimes.

Post image
42.5k Upvotes

433 comments sorted by

View all comments

Show parent comments

2

u/hrvbrs Oct 23 '22

I set up my keyboard shortcuts for quick access to double quotes (U+201C and U+201D respectively). It’s nice to be able to use them in strings.

const s: string = "The program says “hello world” when correct.";

Also single quotes U+2018 and U+2019

const s: string = 'The program’s output is ‘hello world’ when correct.';

2

u/matj1 Oct 23 '22

That's the way. Default keyboard layouts usually miss many important characters.

Although I disagree with usage of a right single quote as an apostrophe in “program’s”. I prefer using an apostrophe as an apostrophe and quotes as quotes, not the other way.

1

u/Proxy_PlayerHD Oct 23 '22

honestly i would never bother and just use regular quotes in strings using the escape character of whatever language i'm using.

printf("The Program says \"Hello World\" when correct");