[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: things are eq? but not generated at the same time
From: |
Ludovic Courtès |
Subject: |
Re: things are eq? but not generated at the same time |
Date: |
Wed, 05 Sep 2012 23:58:07 +0200 |
User-agent: |
Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) |
Hi,
Stefan Israelsson Tampe <address@hidden> skribis:
> If I put,
>
> (define a #(1))
> (define b #(1))
>
> , load the file. Then
>
>> (eq? a b)
> #t
The R5RS reads (info "(r5rs) Equivalence predicates"):
Since it is an error to modify constant objects (those returned by
literal expressions), implementations are permitted, though not
required, to share structure between constants where appropriate.
And then, these examples:
(eq? '(a) '(a)) ==> _unspecified_
(eq? "a" "a") ==> _unspecified_
(eq? "" "") ==> _unspecified_
So no problem here, AFAICS.
Ludo’.