Hacker News new | ask | show | jobs
by kungtotte 2307 days ago
Not exactly the same. Since anything inside ASCII quotes is typically considered a valid string in most programming languages, if you delete everything after the final quotation mark you have a syntactically valid program. It won't do what you want, but it's not a syntax error.

So unicode quotes and ASCII quotes are not exactly the same in this scenario.

1 comments

They both break what you were trying to do, and the fact that they do it in slightly different ways really isn't worth making a long pedantic argument about.
Programming is literally the art of pedantically telling a computer what to do, arguments about it are naturally going to tend towards pedantry. So that's my first point.

The second is that there's a significant difference between "won't run due to syntax errors" and spitting a pasted line back at you since it thinks it's just a string. In a less robust environment the first option might actually crash your environment, or leave you with subtle errors. Like in a shell, it might treat things like escape sequences and things will look off unless you reset them.