Email list hosting service & mailing list manager

Eq? issue Andre van Tonder (04 Jan 2006 07:44 UTC)
Re: Eq? issue Michael Sperber (05 Jan 2006 18:47 UTC)
(missing)
Re: Eq? issue Michael Sperber (08 Jan 2006 14:28 UTC)
Re: Eq? issue Marcin 'Qrczak' Kowalczyk (08 Jan 2006 20:08 UTC)

Eq? issue Andre van Tonder 04 Jan 2006 07:44 UTC

I have a few questions regarding the eq?-issue:

- Can one construct/traverse an eq?-cyclic or eqv?-cyclic graph of
   immutable record nodes?

   According to the spec, it seems that an eq? cyclic graph of
   immutable nodes cannot be constructed, so it would have to be
   eqv?-cyclic, but the spec does not guarantee that

    (let ((f (lambda () (construct ...))))
      (eqv? (f) (f))) => #f

   for /immutable/ records, which I think would be required for
   such cyclic graphs.

- I would not like to artificially declare an immutable record as
   mutable just so I can use it in a cyclic graph.

- A problem with treating mutable and immutable differently is that
   mutable might easily become immutable in the process of development
   if a field is dropped or changed - suddenly a program may break in
   places that are difficut to debug.

- Another problem is that programs that use eq?/eqv? incorrectly will
   mostly work on some Schemes, only to fail, and then mysteriously
   depending on compiler switches and type inference controlling unboxing,
   on others.

Cheers
Andre