From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs 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) Message-ID: <30ea6b31-dc72-4402-9e06-823c2174b826@default> References: <87bmrve6n9.fsf@cassou.me> <9502fe98-aed5-4474-aaed-5e88d5c1cd6f@default> <87wpaic662.fsf@cassou.me> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1492524195 16637 195.159.176.226 (18 Apr 2017 14:03:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 18 Apr 2017 14:03:15 +0000 (UTC) Cc: 26540@debbugs.gnu.org To: Damien Cassou Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 18 16:03:06 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0Tik-00045Z-74 for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Apr 2017 16:03:06 +0200 Original-Received: from localhost ([::1]:42086 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d0Tip-0008LL-QL for geb-bug-gnu-emacs@m.gmane.org; Tue, 18 Apr 2017 10:03:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53759) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d0Thn-0007dG-Uf for bug-gnu-emacs@gnu.org; Tue, 18 Apr 2017 10:02:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d0Thi-0001G3-BK for bug-gnu-emacs@gnu.org; Tue, 18 Apr 2017 10:02:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56649) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1d0Thi-0001Fy-7i for bug-gnu-emacs@gnu.org; Tue, 18 Apr 2017 10:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1d0Thh-0007bl-Sq for bug-gnu-emacs@gnu.org; Tue, 18 Apr 2017 10:02:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 18 Apr 2017 14:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26540 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 26540-submit@debbugs.gnu.org id=B26540.149252407229190 (code B ref 26540); Tue, 18 Apr 2017 14:02:01 +0000 Original-Received: (at 26540) by debbugs.gnu.org; 18 Apr 2017 14:01:12 +0000 Original-Received: from localhost ([127.0.0.1]:54848 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0Tgu-0007ak-BF for submit@debbugs.gnu.org; Tue, 18 Apr 2017 10:01:12 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:50405) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0Tgs-0007aX-OT for 26540@debbugs.gnu.org; Tue, 18 Apr 2017 10:01:11 -0400 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v3IE0tEo008993 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 18 Apr 2017 14:00:55 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.13.8/8.14.4) with ESMTP id v3IE0sJ8007817 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 18 Apr 2017 14:00:55 GMT Original-Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v3IE0rWH023472; Tue, 18 Apr 2017 14:00:54 GMT In-Reply-To: <87wpaic662.fsf@cassou.me> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 12.0.6767.5000 (x86)] X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:131728 Archived-At: > >> 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. >=20 > 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.