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

Re: [Scheme-reports] Write procedure is not backwards compatible



Aaron W. Hsu scripsit:

> Chez Scheme does have WRITE that handles cycles. Specifically, there
> is a parameter PRINT-GRAPH that controls whether or not WRITE will
> print the shared structure of the datum or not. 

Unless you are doing multiple writes within a single procedure, you are
going to have to wrap each write in parameterize in order to get the
correct effect:

(parameterize ((print-graph #t)) (write obj port))

or use #f for #t.  Given all that verbosity, I'd just as soon have separate
write procedures.

-- 
John Cowan   cowan@x    http://ccil.org/~cowan
Original line from The Warrior's Apprentice by Lois McMaster Bujold:
"Only on Barrayar would pulling a loaded needler start a stampede toward one."
English-to-Russian-to-English mangling thereof: "Only on Barrayar you risk to
lose support instead of finding it when you threat with the charged weapon."

_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports