From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: 7 logical-xor implementations in source tree Date: Sun, 28 Jul 2019 08:04:17 +0000 Message-ID: <20190728080417.GA5072@ACM> References: <87tvbd9a8p.fsf@oremacs.com> <87pnm14u95.fsf@tcd.ie> <87sgqvoz5c.fsf@tcd.ie> <87d0hz2e11.fsf@tcd.ie> <5B633129-B795-4BFA-AE81-FE9FD0A24CE9@acm.org> <0edfffbb-6f5a-a6b2-334a-9000e8f2eb3e@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="33669"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mutt/1.10.1 (2018-07-13) Cc: emacs-devel@gnu.org To: Philippe Schnoebelen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 28 10:04:32 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hreAQ-0008b1-Mv for ged-emacs-devel@m.gmane.org; Sun, 28 Jul 2019 10:04:30 +0200 Original-Received: from localhost ([::1]:43978 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hreAP-0001oU-1c for ged-emacs-devel@m.gmane.org; Sun, 28 Jul 2019 04:04:29 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56660) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hreAI-0001oL-HC for emacs-devel@gnu.org; Sun, 28 Jul 2019 04:04:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hreAH-0007qO-AZ for emacs-devel@gnu.org; Sun, 28 Jul 2019 04:04:22 -0400 Original-Received: from colin.muc.de ([193.149.48.1]:16336 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1hreAG-0007pT-QZ for emacs-devel@gnu.org; Sun, 28 Jul 2019 04:04:21 -0400 Original-Received: (qmail 88123 invoked by uid 3782); 28 Jul 2019 07:11:48 -0000 Original-Received: from acm.muc.de (p2E5D5404.dip0.t-ipconnect.de [46.93.84.4]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 28 Jul 2019 09:11:47 +0200 Original-Received: (qmail 5084 invoked by uid 1000); 28 Jul 2019 08:04:17 -0000 Content-Disposition: inline In-Reply-To: <0edfffbb-6f5a-a6b2-334a-9000e8f2eb3e@gmail.com> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:238963 Archived-At: Hello, Philippe. On Sun, Jul 28, 2019 at 09:09:01 +0200, Philippe Schnoebelen wrote: > On 2019/07/25 14:07, Mattias Engdegård wrote: > > 25 juli 2019 kl. 01.44 skrev Basil L. Contovounesios : > > bool-equal, bool-equiv, bool=, bool-eq are all fine as far as I'm concerned. `xnor' and `nxor', not so much. > > Racket has `boolean=?', but presumably it only copes with #t/#f. > > I'll be using `equiv' as placeholder below for brevity. > I like the name `iff'  for this function. No, please don't use the name `iff' here. In mathematical circles, iff means "if and only if", and has done for many decades/several centuries. Introducing it into Emacs with a radically different meaning will be jarring in the extreme to anybody with a maths background. > >>> - There's no use for it, currently. If we can't find any use for it, > >>> I'm not sure it deserves to be in subr.el. > I use the function a lot in ert tests, like in >       (should (iff (null somelist) (zerop (length somelist)))) > --phs -- Alan Mackenzie (Nuremberg, Germany).