[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] Write procedure is not backwards compatible
On Mon, Jul 2, 2012 at 6:26 AM, Jonathan Rees <jar@x> wrote:
> Ouch! If true, I second this comment. Backward compatibility for write is pretty important. Consider the case of running an R5RS (or R7RS) program in an R7RS implementation to generate a file that will be consumed by an R5RS implementation.
>
> There is no mention of this incompatibility in the section "Language changes since R5RS".
Ticket #442 added to vote on this in the next ballot.
Requiring the output of R7RS programs to be readable
by R5RS programs is forwards compatibility, not backwards,
and is unachievable the moment you make any changes
to the lexical syntax (e.g. with bytevector literals).
You can make the case that passing simple lists of
simple data-structures should be compatible between
any Scheme-like system. The WG will discuss and
vote on this. The community is encouraged to provide
additional feedback and examples.
We definitely cannot use the SRFI-38 semantics, which
provide no equivalent to write-simple (i.e. no procedure
which guarantees to be fast).
--
Alex
>
> Jonathan
>
> On Jul 1, 2012, at 12:36 AM, Marc Feeley wrote:
>
>> 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@x
>> http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports
>
>
> _______________________________________________
> Scheme-reports mailing list
> Scheme-reports@x
> http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports