Taylan Kammer <taylan.kam...@gmail.com> writes:
> On 23.06.2023 00:45, Philip McGrath wrote: >> >> Thanks, but this is the opposite of what I want to do. The library I'm >> porting >> already supports creating tables with custom equality and hashing functions. >> What I'm trying to do is make the standard `equal?` procedure recognize when >> two of my table values are semantically the same even if internal >> implementation details differ. >> >> (Note also that SRFI 69 and other libraries provide *mutable* hash tables. >> The >> Racket-on-Chez library I'm porting provides immutable hash tables, more >> properly Hash Array Mapped Tries, as made famous by Clojure.) >> >> -Philip > > Ah, apologies then. As far as I know, there's no other way to do that in > Guile > than with GOOPS, which you've already mentioned. > > In standard Scheme there's no way to do it at all. I don't think there's even > an SRFI for it (I just searched a bit, out of curiosity, couldn't find > anything). YASOS can be implemented in standard Scheme[1], but it has the same limitations as GOOPS in this context. It cannot really be "injected" into existing modules AFAIK. Footnotes: [1] https://notabug.org/PangolinTurtle/yasos-r7rs