[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] Symbol escapes - clarification
On 03/13/2012 10:34 AM, John Cowan wrote:
> 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).
You're not making clear the difference between display and write.
In Kawa, if you *write* (string->symbol "foo)(bar") you get:
|foo)(bar|
If you *display* it you get:
foo)(bar
The confusion is that the Kawa REPL by default uses display rather than
write.
You can override the default using a command-line flag:
$ kawa --output-format readable-scheme
The reason why display is the default is covered here:
http://sourceware.org/ml/kawa/2012-q1/msg00072.html
--
--Per Bothner
per@x http://per.bothner.com/
_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports