This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.

Ticket 52: read/write cyclic data

2012-10-09 13:46:56
WG1 - I/O
alexshinn
major
alexshinn
fixed
source
closed
2010-04-20 06:22:52
defect

SRFI-38 standardizes the #0=(1 . #0#) shared structure notation for read/write. In the case of write, this can be expensive to compute, but otherwise the common case of the repl printing a cyclic structure results in an infinite loop.

Do we want to add support for this, as an option or separate set of procedures?

Since we have to deal with the REPL, I'm inclined to include this, but I'm not sure whether this is something that should be added. I don't know about the various arguments for an against. I know that it is commonly implemented on the Scheme systems that I use. In Chez Scheme, when trying to write a cyclic structure, the PRINT-GRAPH parameter is automatically set to #t for the duration of that operation. In general, with these sorts of things, I'm in favor of controlling them via parameters, so a PRINT-GRAPH parameter makes sense to me here if we do standardize this feature, to enable to disable it.

resolutionfixed
statusnewclosed

The WG has voted to accept SRFI-38 as part of the core.

resolutionfixed
statusclosedreopened

To be revoted because there was no simple majority.

resolutionfixed
statusreopenedclosed

The native read/write will support the SRFI-38 notation natively.

resolutionfixed
statusclosedreopened
owneralexshinn
statusreopenedassigned
statusassigneddecided
owneralexshinn
statusdecidedwriting
resolutionfixed
statuswritingclosed

SRFI 38 notation is accepted on input; on output, there are now various procedures to control how (and if) it's generated.