[R6RS] Unicode scalar value escape sequences

Michael Sperber sperber
Thu Feb 17 08:05:43 EST 2005

When implementing Matthew's proposal, both Richard and I stumbled over
this for string literals:

o \<o>, \<o><o>, \<o><o><o>: octal, where the sequence of <o>s forms
  an octal number between #o0 and #o377
o \u<x>...<x>: hex, up to four digits
o \U<x>...<x>: hex, up to six digits

... and this for character literals:

o #\u<x>...<x> hex, up to four digits
o #\U<x>...<x> hex, up to six digits

Is there a strong reason not to require exactly 3 octal digits and 4
or 6 hex digits, respectively?  (I'm guessing it's Java/C
compatibility, but is that really important at this level?)  Having
the number of digits variable may cause confusion---especially so, as
\x<x><x> in strings requires *exactly* two digits, and #\<o><o><o> in
character literals requires exactly three digits.  (And shouldn't
#\x<x><x> be added to the character literal syntax as well?)

I could personally also do without the ancient octal escapes,
especially as a prefix-less default for number-like-looking things.
Shouldn't that instead be decimal?  (Or shouldn't there be some kind
of way to specify scalar values via decimal literals?)

Cheers =8-} Mike
Friede, V?lkerverst?ndigung und ?berhaupt blabla

More information about the R6RS mailing list