[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#26540: 25.2; [PATCH] Add cl-set-equal to test for set equality
From: |
Drew Adams |
Subject: |
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).
bug#26540: 25.2; [PATCH] Add cl-set-equal to test for set equality, John Mastro, 2017/04/18