[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:
If you *display* it you get:

The confusion is that the Kawa REPL by default uses display rather than 
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:
	--Per Bothner
per@x   http://per.bothner.com/

Scheme-reports mailing list