I'm designing a programming language which has three kinds of quoted entities: strings and characters as in C, and symbols (interned strings intended for use as lookup keys and such) which I consider one of the most endearing features of Lisp. Currently I have the following syntax for these:* // String'*' // Character`*` // Symbolwhich I quite like, but has a couple of potential problems:I'm told that on some keyboard layouts, backquote is a nuisance to type.Backquote and ' are not the most visually distinct of characters, and I have a few times found myself typing ' when I meant backquote. On my setup this is not a problem because I have UltraEdit syntax highlighting set up to show backquoted symbols in green so the mistake is instantly apparent, but of course I can't provide syntax highlighting for most of the editors people use, so at least in the early days most users won't have the benefit of that kind of special coloring.So, given these potential problems, I'd like to get some feedback on which option people consider preferable:Keep the syntax the way I have it now.Swap backquote and ', so that ' is used for symbols and backquote is used for character constants.Use ' for symbols, @* for character constants (in e.g. the Linux kernel code, character constants are something like thirty times rarer than string constants, so it's arguably okay to give them slightly more verbose syntax) and backquote for something else, perhaps raw (most escape codes not interpreted) strings.Use ' for symbols, @* for character constants and forswear the use of backquote entirely.
Backquoted symbols, good or bad?
language design;syntax
I think the potential confusion is a serious problem.  If you already find yourself confusing backquote and single-quote, think how many future code writers and readers will make the same mistake.Many languages that use backquotes as special syntax seem to reserve them for comparatively rare usage.  I could speculate why, but if you expect symbols to get heavy usage, you could take this as a cue to use some other syntax.So, for the multiple choice bonus question, I would prefer #3 or #4 over #1 or #2, for anti-confusion reasons.  You can keep backquotes in reserve for when you need an extra-special quotelike operator...