Re: Examples of external representation
Marc Nieper-WiÃkirchen 09 Apr 2023 21:19 UTC
Am So., 9. Apr. 2023 um 22:42 Uhr schrieb John Cowan <xxxxxx@ccil.org>:
>
>
>
> On Sun, Apr 9, 2023 at 4:33 PM Marc Nieper-Wißkirchen <xxxxxx@gmail.com> wrote:
>
>>
>> > After "the same record" add "(in the sense of `equal?`)".
>>
>> "In the sense of equal?" would be wrong. It is the same sameness as
>> between (1 . ()) and (1).
>
>
> Just so: the result of reading "(1 . ())" is the same (in the sense of `equal?`) to the result of reading "(1)". If you just write "the same", it suggests that they might be the same in the sense of eq?, which is wrong.
For records (at least R6RS records), equal? and eqv? have the same behavior.
From the output of the reader, it is indistinguishable whether (1 .
()) or (1) was seen. This is independent of equal?-ness (or
non-equal?-ness).
> You should also point out that a record literal is immutable, even if the fields of the record type claim to be mutable.
This follows from the general text for constants, but I can add it if
you think it is more helpful than superfluous.