Yes they should. I’m pretty proud I managed to keep the f lowercase, given that I typed this on an iPhone …
That’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.
Code 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.
Those people will notice when their compiler complains and will hopefully know better than to copy+paste something from an untrusted website next time.
This 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.
Human here. I don’t know what they are supposed to be - seriously. Could you explain please?
I 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.
Ok then - the left one's the wrong way around.
If you understand what the quotes are supposed to be, what is the problem?