unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* things are eq? but not generated at the same time
@ 2012-09-05 18:44 Stefan Israelsson Tampe
  2012-09-05 19:13 ` Ian Price
  2012-09-05 21:58 ` Ludovic Courtès
  0 siblings, 2 replies; 7+ messages in thread
From: Stefan Israelsson Tampe @ 2012-09-05 18:44 UTC (permalink / raw)
  To: guile-devel

[-- Attachment #1: Type: text/plain, Size: 522 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 598 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-09-11 17:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-05 18:44 things are eq? but not generated at the same time Stefan Israelsson Tampe
2012-09-05 19:13 ` Ian Price
2012-09-05 19:24   ` Ian Price
2012-09-05 21:54     ` Ludovic Courtès
2012-09-11 17:06     ` Chris K. Jester-Young
2012-09-05 19:27   ` Stefan Israelsson Tampe
2012-09-05 21:58 ` Ludovic Courtès

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).