guile-user
[Top][All Lists]
Advanced

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

Re: SRFI-9 and `equal?'


From: Neil Jerram
Subject: Re: SRFI-9 and `equal?'
Date: Wed, 07 Jun 2006 23:06:19 +0100
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

address@hidden (Ludovic Courtès) writes:

> SRFI-9 is implemented using Guile's records, which in turn are
> implemented (in `boot-9.scm') using structs.  It turns out that `equal?'
> is currently not honored for structs, and this is the cause of this
> SRFI-9 equality issue.
>
> The patch below fixes this at the lowest level (i.e., structs) and adds
> a test to `srfi-9.test' (admittedly, the best thing would be to have a
> `structs.test'...).
>
> If it looks acceptable to you, then perhaps we can add a bit of
> documentation and commit it?

All looks fine to me, except one thing.  I don't think we gain anything by
exporting the struct-equal?/scm_struct_equalp API, so I'd prefer to
have this as an internal (scm_i_) function and not exported to
Scheme.  (Cf. the fact that there isn't any list-equal? in Scheme.)

As you say, docs would be good, and also a NEWS entry.

Regards,
     Neil





reply via email to

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