13 ms·
Is it petty of me that the unmatched single quotes drive me insane?
by drivebyacct2 16y ago
Is it petty of me that the unmatched single quotes drive me insane?
- bakkdoor 16y agoYou mean symbol literals? Ruby uses :foo but that would mix up with the keyword message syntax. So I took Lisp's syntax: 'foo =) Also, since you'll want to have syntax for message names as well, they need to be able to have colons in them, e.g. 'foo:bar:. Basically anything non-whitespace starting with a "'" is taken as a symbol literal.
- rst 16y agoPerhaps not --- but avoid exposure to Lisp. (Unmatched single quotes are the easiest way to embed literal S-expression data inside Lisp S-expressions representing code.)
- stopmi 16y agothink of them as apostrophes
- omaranto 16y agoIt's always bugged me that many programming languages instead of using matching opening and closing quotes surround strings in pairs of closing quotes! )I guess most fonts that programmer's use render these as a sort of neutral vertical quote, so that strings don't look so silly.)
- quag 16y agoAscii (and keyboards) only have a single key for ' and ". They are used as both apostrophes, and quotation marks. Typing in code using proper opening and closing quotation marks would be tedious. Editors could choose to apply some smarts and display strings wrapped in quotes using "curly quotes", but that complicates copy-and-paste and so on. Given the entry situation, the only sane thing to do is use a font that makes both ' and " vertical bars.