GNU bug report logs - #26540
25.2; [PATCH] Add cl-set-equal to test for set equality

Previous Next

Package: emacs;

Reported by: Damien Cassou <damien <at> cassou.me>

Date: Mon, 17 Apr 2017 09:17:01 UTC

Severity: wishlist

Tags: patch

Found in version 25.2

Done: Nicolas Petton <nicolas <at> petton.fr>

Bug is archived. No further changes may be made.

Full log


Message #23 received at 26540 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Damien Cassou <damien <at> cassou.me>
Cc: 26540 <at> debbugs.gnu.org
Subject: RE: bug#26540: 25.2; [PATCH] Add cl-set-equal to test for set equality
Date: Tue, 18 Apr 2017 14:49:35 -0700 (PDT)
> > If we do add it, I'd imagine that the implementation should be
> > the same (adding `not', as you say), for clarity and consistency
> > - unless other things are not equal for some reason (i.e.,
> > unless there is a good reason not to use the existing
> > implementation).
> 
> I updated the patch.

Maybe there is a good reason not to use the existing fn.

I didn't check the patch or the implementation of
`cl-set-exclusive-or', but that function is designed not
just to test for equality but also to return the list (set)
of elements that are in only one of the argument lists.

A naive guess is that when the sets are unequal this would
be slower than just a check for equality.  You might want
to take a look.  If that's the case then a simple equality
implementation would be better (e.g. throw to a catch as
soon as we know they are unequal).




This bug report was last modified 8 years and 13 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.