6 ms·
Those quotes should be "ascii" quotes, not unicode.
by digisign 4y ago
Those quotes should be "ascii" quotes, not unicode.
- klodolph 4y agoThat’s not true, though! It’s written for humans to read, not for machines to parse, and any human reading this will realize what they’re supposed to be.
- _han 4y agoCode is very often written to be copied and pasted though! And you could be surprised by the amount of people not noticing the difference between the quotes.
- f1refly 4y agoThose people will notice when their compiler complains and will hopefully know better than to copy+paste something from an untrusted website next time.
- klodolph 4y agoThis code is very obviously just illustrating a point to the people reading it, it seems unlikely that anyone would want to copy and paste it. Lots of code snippets are incorrect code. For example, I often write C code like this: int x = ...; The line contains a syntax error, but I’m communicating to the people reading that x is initialized to some value.
- tokamak-teapot 4y agoHuman here. I don’t know what they are supposed to be - seriously. Could you explain please?
- skocznymroczny 4y agoI think he means that in the code you'll want to use " rather than ”. ” often end up happening when copy pasting code from some websites or apps like Word and they often cause trouble because they are not parsed as quote characters by compilers/interpreters.
- OJFord 4y agoOk then - the left one's the wrong way around.
- klodolph 4y agoIf you understand what the quotes are supposed to be, what is the problem?
- wodenokoto 4y agoYes they should. I’m pretty proud I managed to keep the f lowercase, given that I typed this on an iPhone …