unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* R6RS Strings
@ 2009-12-29 18:47 Mike Gran
  2010-01-01 22:44 ` Neil Jerram
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Gran @ 2009-12-29 18:47 UTC (permalink / raw)
  To: guile-devel

Hi-

I've been playing a bit with the R6RS concept of character and string escapes.
I think there are a couple of fairly easy things we could do to help
support them.

First off, there are a couple of missing escapes: the named characters
#\alarm, #\linefeed, #\vtab, and #\delete, and the string escape "\b"
for backspace.

Second, what do you think about making a reader option to change the
input and output format of string and character escapes to the R6RS escapes?

Characters would be #\xNNN, where NNN is a hexidecimal number of one
to 9 (!) digits, even though 6 digits is always sufficient.

String escapes would become "\xNNN;" where, again, NNN is a hex number of
variable length, and where there is a terminal semicolon ';'.

(For those that don't recall the discussion, the character and string
escapes in Guile 1.9 were designed not to break code written for 1.8.x,
which is why they don't follow R6RS.  They also leverage some of the
libunistring behaviors.)

Lastly, there is also a rather bizarre 
\<intraline whitespace><line ending><intraline whitespace>
escape sequence in R6RS, which could be incorported, I guess.

-Mike Gran




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: R6RS Strings
  2009-12-29 18:47 R6RS Strings Mike Gran
@ 2010-01-01 22:44 ` Neil Jerram
  0 siblings, 0 replies; 2+ messages in thread
From: Neil Jerram @ 2010-01-01 22:44 UTC (permalink / raw)
  To: Mike Gran; +Cc: guile-devel

Mike Gran <spk121@yahoo.com> writes:

> First off, there are a couple of missing escapes: the named characters
> #\alarm, #\linefeed, #\vtab, and #\delete, and the string escape "\b"
> for backspace.

So these could be supported without any compatibility concerns?

> Second, what do you think about making a reader option to change the
> input and output format of string and character escapes to the R6RS escapes?
>
> Characters would be #\xNNN, where NNN is a hexidecimal number of one
> to 9 (!) digits, even though 6 digits is always sufficient.
>
> String escapes would become "\xNNN;" where, again, NNN is a hex number of
> variable length, and where there is a terminal semicolon ';'.

All sounds good to me!  (I don't see any downside, am I missing one?)

    Neil




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-01-01 22:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-29 18:47 R6RS Strings Mike Gran
2010-01-01 22:44 ` Neil Jerram

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).