[Top][All Lists]

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

Re: scm_i_print_symbol_name() in libguile/print.c ...

From: Andy Wingo
Subject: Re: scm_i_print_symbol_name() in libguile/print.c ...
Date: Mon, 11 Apr 2011 17:16:04 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Hello again :)

On Mon 11 Apr 2011 15:08, Wolfgang J Moeller <address@hidden> writes:

> Having any sort of escapes mixed with #{ }# notation would be incompatible -
> maybe you ought no longer generate #{ }# on output, but switch to R6RS escapes
> throughout. Since there has been (in my understanding) no way to read symbols
> containing "}#" so far, just keep the "transparent" treatment of those
> guile-private brackets on input.

We have a choice of ensuring that:

  (equal? (with-input-from-string (object->string sym) read) sym)

or preserving the old behavior that introduced spurious backslashes in
the symbol names.  Incidentally it does appear that }# could be read, in
theory, given the fact that }# in a name would be written out as }\#.
Strange stuff.  I think interpreting \ as a general escape is compatible
with the intentions of that code, and \x...; is generally compatible as
well, if we assume that nobody was escaping x in their own code, because
Guile sure wasn't.

Anyway, I do think that providing an option to just use r6rs syntax for
serialization is a good idea.  Unfortunately you can't do it in general,
because there is the #{}# case to deal with, but oh well.



reply via email to

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