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

Re: [Scheme-reports] Symbol escapes - clarification

Alaric Snell-Pym writes:
> On 01/10/2012 01:51 AM, John Cowan wrote:
> >> Maybe a whitelist of characters that are definitely allowed
> >> in symbols?
> >
> > There is such a list (of ASCII characters only) in 2.1.
> Don't forget that string->symbol exists, and if it doesn't live by
> the same restrictions, will be capable of generating symbols that
> can't be represented with WRITE. And if it does live by those
> restrictions, it'll be faintly annoying that strings and symbols
> aren't symmetrical.

Such symmetry could be had on the cheap by building the escape syntax
for symbols directly on string syntax, say #"102" instead of |102|.

Just a thought.

> The text on identifiers in 2.1 says that . is not an identifier; does
> that mean I *cannot* write (define |.| 123) and then (+ |.| 456)?

I think it only means that you cannot write (define . 123) but must
write (define |.| 123) instead.

Scheme-reports mailing list