From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.devel Subject: Re: 7 logical-xor implementations in source tree Date: Thu, 25 Jul 2019 00:44:58 +0100 Message-ID: <87d0hz2e11.fsf@tcd.ie> References: <87tvbd9a8p.fsf@oremacs.com> <87pnm14u95.fsf@tcd.ie> <87sgqvoz5c.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="155363"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org, Oleh Krehel To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 25 01:45:13 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 1hqQwX-000eCP-Jc for ged-emacs-devel@m.gmane.org; Thu, 25 Jul 2019 01:45:09 +0200 Original-Received: from localhost ([::1]:54990 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqQwV-0005be-Tl for ged-emacs-devel@m.gmane.org; Wed, 24 Jul 2019 19:45:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35941) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hqQwS-0005bJ-E5 for emacs-devel@gnu.org; Wed, 24 Jul 2019 19:45:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hqQwR-00077h-7Y for emacs-devel@gnu.org; Wed, 24 Jul 2019 19:45:04 -0400 Original-Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:38382) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hqQwQ-00076d-Rq for emacs-devel@gnu.org; Wed, 24 Jul 2019 19:45:03 -0400 Original-Received: by mail-wm1-x344.google.com with SMTP id s15so21684176wmj.3 for ; Wed, 24 Jul 2019 16:45:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=4GiPCaO8UCTMnYuhW7HUfE+CxuHSTU1f3w59hxseJHA=; b=Sc6hWS+i28UknDCnWhiGjaBCuDkycX95Tc/1z+NeiQCGOYgowI9uAOFCNbVr+F5WRw FSaqk1LoU5ye4R7wbBPBkaeKa5Yjm705zTlpn3Vt0E8QIMvlvvMDqdVstZMsTTZ8vocx gbldvRcntPo74x7U0hTzLfb2u80tXNhNoOsLLwIHmU3tWGWH4nUvndsSVPcIDIwVZlEd lu7Q0f4YNtcl9JoaTHrsqVsNpLdiuDt2kmVz87Jh7zruKCfRL9/BOEasy/GqFtytjIZT AQzs3dvqrDun7AbKCPpPwRizcS3rRmrOW5Fqhf6jWcXTyuP0/xOoUNitk+LdbaB2aCM7 bxZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=4GiPCaO8UCTMnYuhW7HUfE+CxuHSTU1f3w59hxseJHA=; b=AIWdL3E61LkJUMovrRO/WLNI3nezN9XtpW2037VhKwQ9iVbhSZx33vIULVJCHZdIkL uZbxkLycEplDEeMAxEnb3kVyNMbjaQTgJZdS/cG9taZvEvgavmnQFkhQLsCysoj9tH1T zrzQtAffR0MP2dlSVUOewmubG4Bcv5I5fyevTCJq9aYd/v+gSVHcHdLRq7/PX1aajkP3 +BBuUE2Vfml8kGWotDlnoE0eOTcQG9CYz/gj5KDHBcnKRYndH2lrVErq4E/Sy099wEPE /dWcSsfZ6g+VIPKE4O4Iv79xU/uICakesHUjefn941GLiSDptkYh8m65Tag42am7DBoG XdDA== X-Gm-Message-State: APjAAAXmmsPGIyOne/5qdY9AEODhaemqcgyHmlrYWVwyezcQ/mce8M+6 gDLNZJedhMwDArvIqHLTnk/09oIBKf4= X-Google-Smtp-Source: APXvYqzU9k8QlXU1vNHOheU6zUGqbZ5pT23BC7hV4SUkUD2piX0k42U0E9Bc2LA7ioXPTmXdQ42U4Q== X-Received: by 2002:a05:600c:23cd:: with SMTP id p13mr70127186wmb.86.1564011901304; Wed, 24 Jul 2019 16:45:01 -0700 (PDT) Original-Received: from localhost ([2a02:8084:20e2:c380:1f68:7ff5:120d:64e]) by smtp.gmail.com with ESMTPSA id g19sm53476944wmg.10.2019.07.24.16.45.00 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 24 Jul 2019 16:45:00 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Wed, 24 Jul 2019 19:15:27 -0400") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::344 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:238877 Archived-At: Stefan Monnier writes: >> It also includes Mattias' equiv suggestion. > > Not convinced about this one: > - The name is too much like "equal/eq/eql": we need something much > more explicit to avoid adding to the already existing confusion. > I'd go with something like `bool-equal`. Fine by me, but see my comment about xnor below. > - The fact that it's not a function is a definite downside. Sure, though I'm interested to hear arguments to the contrary. > - 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. > Actual/potential uses of it might also help figure out if having it as > a function would be beneficial/useful and whether the detail about > which non-nil value is returned is important and whether supporting > more than 2 args is important. The patch uses equiv in two places. In both cases it is equivalent to a dyadic xnor function. My original patch had provided dyadic xor and xnor functions, so I'm happy either way. Of course, we could also just provide a dyadic xor and use its negation in place of the two equiv occurrences; then the xor parts of the patch could be pushed sooner, and the relative merits of the equiv parts discussed further, as you suggest. Thanks, -- Basil