[Larceny-users] quote-like form

Lynn Winebarger owinebar at gmail.com
Sat Sep 19 18:46:45 EDT 2009


On Sat, Sep 19, 2009 at 12:47 PM, David Van Horn <dvanhorn at ccs.neu.edu> wrote:
> Felix Klock wrote:
>> Can you make clearer which requirements you are trying to respect?  I do
>> not think you are referring to a requirement of R5RS, since it says that
>> "implementations are permitted, though not required, to share structure
>> between constants where appropriate."
>
> I believe this language is to allow syntactically distinct but identical
> quoted constants to potentially be eq?.  For example,
>
> (define (f) '(1 2 3))
> (define (g) '(1 2 3))
>
> It is allowed that (eq? (f) (g)).

Absolutely. Side effecting quoted structures can lead to mysterious
consequences.  Even
(define (f x) `(,x 1 2 3))
(define (g x) `(,x 4 2 3))
(eq? (cddr (f 10)) (cddr (g 'z))) ==> #t
is allowed.

Lynn



More information about the Larceny-users mailing list