[Scheme-reports] Write procedure is not backwards compatible Marc Feeley (01 Jul 2012 04:37 UTC)

[Scheme-reports] Write procedure is not backwards compatible Marc Feeley 01 Jul 2012 04:36 UTC

Formal Comment

Submitter's name: Marc Feeley
Submitter's email: feeley at iro.umontreal.ca
Relevant draft: r7rs draft 6

Type: defect
Priority: major
Relevant section of draft: 6.13.3. Output

Summary: Write procedure is not backwards compatible

R7RS introduces a new output procedure called write-simple, which has
the same semantics as the R5RS write procedure.  On the other hand,
the R7RS write procedure handles shared structures differently than
the R5RS.  For example :

   (let ((x (list 1 2))) (write (list x x)))

       displays ((1 2) (1 2)) in an R5RS system
   and displays (#0=(1 2) #0#) in an R7RS system

To preserve backwards compatibility, it is the version of the write
procedure which uses datum labels which should have a different name.
In fact SRFI-38 has specified the name write-with-shared-structure for
this output procedure.  This name should be maintained since it has
been implemented with that name in some Scheme systems.

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