5 ms·
I think they are talking a about styled quotes, the kinds that point inward, which a REPL won't interpret as an ASCII quote and will throw some type of Syntax e
by Osiris 7y ago
I think they are talking a about styled quotes, the kinds that point inward, which a REPL won't interpret as an ASCII quote and will throw some type of Syntax error.
- chrisseaton 7y agoOk but those are standard, valid characters like any others. Why are they ‘horrid’?
- tedunangst 7y agoBecause they result in a syntax error.
- chrisseaton 7y agoBut they wouldn’t do what you wanted anyway if they were ASCII. What’s the problem specifically with them being Unicode?
- nitrogen 7y agoThe problem specifically is that they are not the ASCII quote character. There is only one ASCII quote character, and that's the one used by programming languages. Any other quote or quote-like character is outside the ASCII range, and must therefore be Unicode (or another non-ASCII code page).
- chrisseaton 7y agoI know they're not compatible with programming languages that you may want to use. But that's the languages' problem. They're perfectly valid, standardised, characters.
- kortilla 7y agoNo, iBooks inserting them around commands is the problem.
- progval 7y agoInserting ASCII quotes instead would result in exactly the same problem.
- kungtotte 7y agoNot 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.
- DagAgren 7y agoThey 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.
- kungtotte 7y agoProgramming 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.
- chipotle_coyote 7y agoEven though the OP seems offended by the presence of the Unicode quote marks for some reason, they have nothing to do with the issue of Apple Books surrounding the copied text with those quote marks and adding an attribution line. If they'd surrounded the text with ASCII quote marks and added an attribution line, it would have still been a syntax error, wouldn't it. Personally, I don't see any reason to hate typographically correct quote marks when used correctly, which (obviously) doesn't include code samples.
- brnt 7y agoBecause for some reason terminals are stuck in the 70ies and don't accept those characters as quotes. Anything but ASCII trips them up. Seems such an obvious interface to innovate, but it seems to run into terminal wizards sense of purity.
- JdeBP 7y agoThe idea that "terminal wizards" reject this is rather undermined by the fact that "terminal wizards" made open and close double quotation marks accessible as simply [Group2]+[B04] and [Group2]+[B05] on an ISO 9995-3 conformant keyboard. Or [Shift]+[Option] [B04] and [Shift]+[Option] [B05] if there's no explicit [Group2] shift. Open and close single quotation marks use the same keys. "terminal wizards" have done quite the opposite of rejecting this.
- samatman 7y agoThe problem, such as it is, is with languages. Terminals (mine at least) handle most of Unicode just fine; admittedly I've seen it choke on emoji, but punctuation, nah. The vast majority of programming languages are defined in terms of ASCII and only ASCII. I don't care for this, personally. I've given some thought to how to do quoting right in a programming language, and implemented «guillemets» as an experiment. But it's challenging, you need to decide what to do with all of “”‟„"″ and there aren't obvious pairings, like „this is a sentence” and “this is a sentence” and »this is a sentence» and «this is a sentence» and »this is a sentence«, it ends up feeling like rather a lot of effort for what you get in return. Oh, one of those characters I typed isn't a quotation mark, did you catch which one? Hacker news won't even let me type two of them!
- Santosh83 7y agoA language or interface is defined by the set of symbols mutually agreed upon. If you allow Unicode that number simply explodes, thus bloating and complicating the language/interface and its implementation as well. In effect it is no longer the same language but becomes a different, more complex one. The tradeoff is not worth it for programming languages the same way as learning all the scripts of the world is not worth it for one human being, just to accomplish tasks that don't need all these symbols in the first place.
- daveFNbuck 7y agoSome people hate unicode quotes because lots of software will automatically convert ASCII quotes to them when you copy/paste your code to Slack or email to share with others.
- okasaki 7y agoThey're horrid because you can't easily type them on a keyboard.