all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Damien Cassou <damien@cassou.me>
Cc: 26540@debbugs.gnu.org
Subject: bug#26540: 25.2; [PATCH] Add cl-set-equal to test for set equality
Date: Tue, 18 Apr 2017 07:00:52 -0700 (PDT)	[thread overview]
Message-ID: <30ea6b31-dc72-4402-9e06-823c2174b826@default> (raw)
In-Reply-To: <87wpaic662.fsf@cassou.me>

> >> This patch adds cl-seq-equal to test whether two lists have the
> >> same elements. I.e., if every element of LIST1 also appears in
> >> LIST2 and if every element of LIST2 also appears in LIST1.
> >
> > Common Lisp (and the Emacs emulation) already has set
> > functions that do this - `[cl-]set-exclusive-or', for
> > example.
> 
> are you saying that (1) I should propose an implementation of
> set-equal based on set-exclusive-or (I guess it's just a `not`
> call away) or (2) not propose set-equal all together? I understand
> (1), but not the reasoning behind (2).

I'm just pointing out that a function we already have,
and one that is used more widely by users of Common
Lisp, does the same thing - unless I'm missing something.

If people think that some users might not think to use
`set-exclusive-or' to test set equality then we could
add a `set-equal' function.  Common Lisp didn't think
so, and neither do I, but I wouldn't oppose adding it.

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).

In sum, I don't oppose adding it.  I'm just pointing
out that we already have it, in another form.





  reply	other threads:[~2017-04-18 14:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-17  9:16 bug#26540: 25.2; [PATCH] Add cl-set-equal to test for set equality Damien Cassou
2017-04-17 13:55 ` Drew Adams
2017-04-18 11:21   ` Damien Cassou
2017-04-18 14:00     ` Drew Adams [this message]
2017-04-18 14:40       ` Damien Cassou
2017-04-18 21:49         ` Drew Adams
2017-04-18 20:13 ` John Mastro
2017-04-18 21:53   ` Drew Adams
2017-04-19  9:39   ` Nicolas Petton
2017-04-19 10:43     ` Damien Cassou
2017-04-19 11:39       ` Damien Cassou
2017-04-19 14:41         ` Nicolas Petton
2017-05-03 13:02           ` Damien Cassou
2017-05-04  9:41             ` Nicolas Petton
2017-04-19 21:19         ` Michael Heerdegen
2017-05-03 13:12           ` Damien Cassou
2017-05-11 19:42             ` Michael Heerdegen

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=30ea6b31-dc72-4402-9e06-823c2174b826@default \
    --to=drew.adams@oracle.com \
    --cc=26540@debbugs.gnu.org \
    --cc=damien@cassou.me \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.