[R6RS] string escapes

Matthew Flatt mflatt at cs.utah.edu
Thu Mar 2 13:40:53 EST 2006

Backslash escapes in the Unicode SRFI inspired considerable complaint.
As far as I can tell, there is sight opposition to additions like \n
and \t. There was more substantial opposition to \x, \u, and \U,
because there are three of them, and because there's no ending

Given that we've abandoned C-ish compatibility in other ways, and that
ugly \x, \u, and \U are ugly and unpopular, I suggest that we

Among the various suggestions, I found Jorgen Schaefer's suggestion
most palatable:

  (see the "String Escape" section)

but I would like something even more regular. If we used


in strings, we couldn't use the same syntax for characters, because "("
is a delimiter outside of strings. So maybe


in strings and symbols and


for characters, where the "<" and ">" are literal and "X" stands for a
hex digit.

Of course, if we escape delimiters, we could use Scheme syntax for
numbers, as suggested before. But I like the simplicity of hex-only
combined with the readability of escape delimiters.



More information about the R6RS mailing list