guile-user
[Top][All Lists]
Advanced

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

Re: Equality and hashing for new datatypes


From: Jean Abou Samra
Subject: Re: Equality and hashing for new datatypes
Date: Sun, 25 Jun 2023 20:54:20 +0200
User-agent: Evolution 3.48.3 (3.48.3-1.fc38)

Le mercredi 21 juin 2023 à 18:25 -0400, Philip McGrath a écrit :
> Hi,
> 
> What is the recommended way for a library to customize `equal?` and `equal?`
> -based hashing for new datatypes it defines?
> 
> I know from [1] that `equal?` can be customized using GOOPS; however, some
> projects do not use GOOPS (e.g. [2]), so it would seem more friendly for a
> generic library to avoid it. Also, it is not clear if the same mechanism is
> even an option for customizing `equal-hash` to match `equal?`.


As far as I can see from the code in libguile/eq.c, GOOPS is the only way,
sorry.

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

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