guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

things are eq? but not generated at the same time


From: Stefan Israelsson Tampe
Subject: things are eq? but not generated at the same time
Date: Wed, 5 Sep 2012 20:44:26 +0200

Hi,

I found that this optimization can lead to dangerous bugs.

If I put,

(define a #(1))
(define b #(1))

, load the file. Then

> (eq? a b)
#t

Is this an optimization we need. I can figure out applications where you do not want this behavior e.g. I wan't to make distinct objects
and add metadata by making a vector of it. Now different objects might have the same metadata and now go against my intuition and
coerce the objects.

I fear that many difficult to spot bugs will come out of this design choice!

/Stefan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]