From: Jean Abou Samra <jean@abou-samra.fr>
To: Philip McGrath <philip@philipmcgrath.com>,
guile-user <guile-user@gnu.org>
Subject: Re: Equality and hashing for new datatypes
Date: Sun, 25 Jun 2023 20:54:20 +0200 [thread overview]
Message-ID: <bfcc88dfae3ea287951d6edce0136b31a64cd20d.camel@abou-samra.fr> (raw)
In-Reply-To: <3759578.e9J7NaK4W3@bastet>
[-- Attachment #1: Type: text/plain, Size: 601 bytes --]
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 #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
prev parent reply other threads:[~2023-06-25 18:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-21 22:25 Equality and hashing for new datatypes Philip McGrath
2023-06-22 11:33 ` Taylan Kammer
2023-06-22 22:45 ` Philip McGrath
2023-06-23 7:09 ` Taylan Kammer
2023-06-23 12:46 ` Robby Zambito
2023-06-25 18:54 ` Jean Abou Samra [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bfcc88dfae3ea287951d6edce0136b31a64cd20d.camel@abou-samra.fr \
--to=jean@abou-samra.fr \
--cc=guile-user@gnu.org \
--cc=philip@philipmcgrath.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).