Haskell allows the single-quote character in identifiers, so you can use variable names with primes, like
x'. This is so convenient (especially for naming “revised” versions of variables, which seems to happen a lot when assignment isn't available) that I've been missing it in Clojure recently.
There's no reason lisps can't have this. Common Lisp supports nonterminating macro characters — characters that have special meaning when they appear on their own, but not when they appear in the middle of a token. Like many of CL's features (generic functions, anyone?) this isn't used much in the standard library; by default there's only one nonterminating macro character,
#, and that's only for historical reasons (compatibility with Maclisp, I think). But it's easy to make new ones, which solves the
x' problem in one line:
(set-macro-character #\' (get-macro-character #\') t)T CL-USER>
'(x x' y y')(X |X'| Y |Y'|)
T as the third argument of
set-macro-character means “nonterminating”.) Note that
quote still works. Symbols with primes print funny, because the printer doesn't realize nonterminating macro characters don't have to be escaped, but they work fine; you can name variables with primes to your heart's content.
This should be the default in any new lisp:
' should not terminate tokens. Neither should any macro character except
;, really — termination only matters when you leave out spaces between tokens, and who does that?