Re:Fancy: first bootstrapped language targeting Rubinius VM ...
by drivebyacct2 on Wednesday February 23, 2011 @10:00PM
(#2256765)
Is it petty of me that the unmatched single quotes drive me insane?
[ Parent
| on HN ]
Re:Fancy: first bootstrapped language targeting Rubinius VM ...
by rst on Wednesday February 23, 2011 @10:07PM
(#2256778)
Perhaps 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.)
Re:Fancy: first bootstrapped language targeting Rubinius VM ...
by thefool on Wednesday February 23, 2011 @10:28PM
(#2256814)
And ocaml, where you need them for polymorphism.
Re:Fancy: first bootstrapped language targeting Rubinius VM ...
by riffraff on Thursday February 24, 2011 @01:18AM
(#2257137)
and scala, where they also represent symbols
Re:Fancy: first bootstrapped language targeting Rubinius VM ...
by bakkdoor on Wednesday February 23, 2011 @10:06PM
(#2256775)
You 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.
Re:Fancy: first bootstrapped language targeting Rubinius VM ...
by omaranto on Wednesday February 23, 2011 @10:26PM
(#2256811)
It'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.)
Re:Fancy: first bootstrapped language targeting Rubinius VM ...
by quag on Wednesday February 23, 2011 @10:35PM
(#2256829)
Ascii (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.