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

Re: [Scheme-reports] Symbol escapes - clarification

Marijn scripsit:

> Shouldn't these functions be each others inverses as the names so
> strongly suggests?


> Which of the options unescaped/escaped follows from that?

Either.  In fact, however, all Schemes in my test suite (except Rep,
Schemik, and Oaklisp, which don't support `string->symbol`) use the
unescaped version.  I tested with (string->symbol "foo)(bar") and in
all cases got an ordinary symbol.

An interesting difference was the way in which the symbol was printed.
Racket, Gauche, MIT, Gambit, Chicken, SISC, Chibi, STklos printed the
symbol name within vertical bars.  Guile, Chez, Icarus/Vicare, Larceny,
Ypsilon, KSi printed it as foo\x29;\x28;bar, R6RS-style.  SCM, Shoe, Elk
displayed foo\)\(bar.  And Bigloo, Scheme48/scsh, Kawa, Mosh, IronScheme,
NexJ, SigScheme, TinyScheme, Scheme 9, Dream, RScheme, Scheme 7, BDC,
XLisp, UMB, VX, Owl Lisp displayed the symbol raw (this is arguably a
bug in Mosh and IronScheme, which are R6RS implementations).

Note that this list does not match the list of implementations which
*accept* vertical bars, hex escapes, and backslashes.

John Cowan              cowan@x          http://www.ccil.org/~cowan
Most people are much more ignorant about language than they are about
[other subjects], but they reckon that because they can talk and read and
write, their opinions about talking and reading and writing are as well
informed as anybody's.  And since I have DNA, I'm entitled to carry on at
length about genetics without bothering to learn anything about it.  Not.
                        --Mark Liberman

Scheme-reports mailing list