The fact that ASCII does not have balanced quotes is one of the great catastrophes of computing. It makes everything more complicated than it needs to be, from embedding code in strings to parsing CSV files, to regexps. For example, if I want to embed a quoted string in another quoted string, I have to escape the inner quotes like so: "This is string containing an embedded \"quoted\" string" Then I have to think abou…
let's rewrite social idioms to use as quotes.
ASCII and Unicode quotation marks
51–60 of 195 posts
Re: ASCII and Unicode quotation marks
#52The fact that ASCII does not have balanced quotes is one of the great catastrophes of computing. It makes everything more complicated than it needs to be, from embedding code in strings to parsing CSV files, to regexps. For example, if I want to embed a quoted string in another quoted string, I have to escape the inner quotes like so: "This is string containing an embedded \"quoted\" string" Then I have to think abou…
Re: ASCII and Unicode quotation marks
#53The fact that ASCII does not have balanced quotes is one of the great catastrophes of computing. It makes everything more complicated than it needs to be, from embedding code in strings to parsing CSV files, to regexps. For example, if I want to embed a quoted string in another quoted string, I have to escape the inner quotes like so: "This is string containing an embedded \"quoted\" string" Then I have to think abou…
The complexity might be minimized, but not avoided. You would still need an escape mechanism for something like «She said «The \» key on the server doesn't work.»» ASCII did add , [], and {}, any of which could have been used for quoted strings, had the programming language designers chosen that option. https://en.wikipedia.org/wiki/String_literal#Paired_delimite... points out that PostScript and Tcl have a string li…
Yes, but that's a pretty rare case, much more so than embedded strings.
Even that case could be solved by having two different quotes, like Python which allows both 'string' and "string". So you could do:
«This is a string that mentions the ” character without escaping it»
“This is a string that mentions the « character without escaping it”
Yes, there are still some edge cases, like embedding both “ and « in the same string. But that's really rare.
Re: ASCII and Unicode quotation marks
#54Earlier quoted context omitted.
Well, since my keyboard doesn't have an mdash key, if there's no support for something like — or --- then I can't use mdashes.
Nobody's keyboard had an em-dash key (well, maybe some compositor keyboards...). It's well worth the time to figure out how to enter at least the most useful Unicode characters. See, here's an em-dash: —.
Test it with:
setxkbmap -option compose:menu
Then press the menu/compose key (next to right control), then C, then =. You get €.Try compose, 1, 2 for ½.
Compose, ^, 3 for ³.
Compose, A, : for Ä.
It's pretty intuitive for the most useful characters, and easily the fastest way I have of typing the ö, ñ and å in various colleagues' names.
Re: ASCII and Unicode quotation marks
#55Earlier quoted context omitted.
It doesn't need to. You can put the mdash directly in comments: — As opposed to regular dash: -
Well, since my keyboard doesn't have an mdash key, if there's no support for something like — or --- then I can't use mdashes.
Re: ASCII and Unicode quotation marks
#56Earlier quoted context omitted.
Well, since my keyboard doesn't have an mdash key, if there's no support for something like — or --- then I can't use mdashes.
If I need a special character, I find a web page or document that has it and use copy/paste.
Re: ASCII and Unicode quotation marks
#57Earlier quoted context omitted.
Nobody's keyboard had an em-dash key (well, maybe some compositor keyboards...). It's well worth the time to figure out how to enter at least the most useful Unicode characters. See, here's an em-dash: —.
Linux users should enable the compose key, it's very useful. Test it with: setxkbmap -option compose:menu Then press the menu/compose key (next to right control), then C, then =. You get €. Try compose, 1, 2 for ½. Compose, ^, 3 for ³. Compose, A, : for Ä. It's pretty intuitive for the most useful characters, and easily the fastest way I have of typing the ö, ñ and å in various colleagues' names.
Re: ASCII and Unicode quotation marks
#58The fact that ASCII does not have balanced quotes is one of the great catastrophes of computing. It makes everything more complicated than it needs to be, from embedding code in strings to parsing CSV files, to regexps. For example, if I want to embed a quoted string in another quoted string, I have to escape the inner quotes like so: "This is string containing an embedded \"quoted\" string" Then I have to think abou…
If ASCII had balanced quotes then they would be used by programming languages to delimit strings and we would be back to square one with regards to escaping them!
Re: ASCII and Unicode quotation marks
#59Earlier quoted context omitted.
If ASCII had balanced quotes then they would be used by programming languages to delimit strings and we would be back to square one with regards to escaping them!
You don’t need escaping in «This is a string containing an «embedded» quoted string».
Re: ASCII and Unicode quotation marks
#60I remember staring for a long time at the file when I first saw an m4 macro. My brain was telling, surely this has go to be a typo, but then everything worked as expected. Then I learned that's a proper way of quoting there.