guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fwd: Re: Unrecognized \ sequences and Elisp


From: Paul Jarc
Subject: Re: Fwd: Re: Unrecognized \ sequences and Elisp
Date: Tue, 27 Jan 2004 04:04:23 -0500
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux)

Roland Orre <address@hidden> wrote:
> R5RS defines only \\ and \";  ``Scheme does not specify the effect
> of  a  backslash  within  a  string that  is  not  followed  by  a
> doublequote or backslash.

Then portable programs cannot use other escape sequences, which means
that implementations can invent meanings for other escape sequences
without breaking portable programs.

> I consider the reason for escape sequences in strings is to be able
> to express a " within a string, i.e. to be able to express a
> character that we would otherwise not be able to put in the string.

They're also useful for representing characters that would be
difficult to work with literally - control characters, etc.

> I consider that it is better to have routines like read-ansi-string
> and write-ansi-string, which was previously suggested,

Do you have a reference?  I don't know what those are intended to do,
but it doesn't sound like the same job that escape sequences do.

> general interpretation of escape sequences within strings will
> affect the general handling of strings in different applications.

Well, if we see the two characters \( in the middle of a string, then
the program is not portable, and we have to decide on our own what to
do about it.  Treating it like plain ( eliminates the possibility of
future extensions, so now Guile has been changed to throw an error -
i.e., it refuses to interpret this escape sequence at all.  Isn't that
what you want?


paul




reply via email to

[Prev in Thread] Current Thread [Next in Thread]