[plt-scheme] equal? operator

From: Eli Barzilay (eli at barzilay.org)
Date: Mon Nov 21 12:39:57 EST 2005

On Nov 20, Hans Oesterholt-Dijkema wrote:
> Is it possible to extend the equal? operator for new (structure)
> types in mzscheme?

If you need this for objects in your OO system, then why don't you
implement your own equality predicate using the class system?
(Especially given your reasons for why the standard solutions don't

On Nov 20, Hans Oesterholt-Dijkema wrote:
> Oh, and is it maybe also possible to extend eq?  I'd like eq? to
> work differently for persistent roos objects, comparing their Object
> Identifiers instead of their "memory" locations.

You don't want to do that!  Making `eq?' do anything else is going to
be confusing anyone who sees your code.

          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!

Posted on the users mailing list.