From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: 7 logical-xor implementations in source tree Date: Wed, 31 Jul 2019 16:20:57 -0700 (PDT) Message-ID: <5e36d18d-5a51-410e-9cd2-d03ba62aca0f@default> 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> <20190728080417.GA5072@ACM> <875znm3q19.fsf@mbork.pl> <20190730093651.GA5427@ACM> <7n36iny4yq.fsf@ecube.ecubist.org> <7nftmmkz83.fsf@ecube.ecubist.org> <87y30e6j5b.fsf@web.de> <4de86e2c-18ab-4cf1-9a70-e43310234ad0@default> <87r265yi4r.fsf@tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="94697"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Michael Heerdegen , Barry Fishman , emacs-devel@gnu.org To: "Basil L. Contovounesios" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 01 01:24:06 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 1hsxwz-000OW8-Lk for ged-emacs-devel@m.gmane.org; Thu, 01 Aug 2019 01:24:05 +0200 Original-Received: from localhost ([::1]:45022 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsxwy-0004TA-Gt for ged-emacs-devel@m.gmane.org; Wed, 31 Jul 2019 19:24:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50948) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hsxuD-0007pw-KI for emacs-devel@gnu.org; Wed, 31 Jul 2019 19:21:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hsxuC-0000Bw-HS for emacs-devel@gnu.org; Wed, 31 Jul 2019 19:21:13 -0400 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:33768) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hsxuC-0000Bd-8A for emacs-devel@gnu.org; Wed, 31 Jul 2019 19:21:12 -0400 Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x6VMt2U7045725; Wed, 31 Jul 2019 23:21:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=RvYe9Nqw7b+nMh0JRhPKcaqUKB/JJAx1znt7oek+5s8=; b=5nf89gmu/YmM60ig87uM7zjqofU9KToPqHxDGuYEqBdNvdpQzbNt68wl2HjyMIutQn09 nuYYFxiFRGFvqHZHI3au4WiCnPxSvnQom0wEZH4yKLXZic/qdfxYikA6FNlm9o8H1hDE TuGEIQMmVHxJGxVgZG9yO821bm4HVSVRLVK/6sZIqA06UTxENUAZ3/Gz/SRUISMQwbQK 85SdW5/0k3UWL6GV9m24G9C1Zv/UC8cHGrkPofqBw2ed55J0o0nLrw57yRbp4vTkXhje ebELtiGbO3qzDVZmg8xsqcuZLVMtJhk7qGje8fby1pKZNqbB0nInj+biY39xBAB29J08 kw== Original-Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by aserp2120.oracle.com with ESMTP id 2u0ejpr5r6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 31 Jul 2019 23:21:06 +0000 Original-Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x6VMrMHd067049; Wed, 31 Jul 2019 23:21:06 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3030.oracle.com with ESMTP id 2u349dcxxs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 31 Jul 2019 23:21:06 +0000 Original-Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x6VNKw6u017000; Wed, 31 Jul 2019 23:20:58 GMT In-Reply-To: <87r265yi4r.fsf@tcd.ie> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4873.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9335 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=776 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1907310229 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9335 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=833 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1906280000 definitions=main-1907310229 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 141.146.126.78 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:239076 Archived-At: > > Why is it important that Emacs Lisp have such > > an operator? (Answer: it's not - YAGNI.) >=20 > If YAGNI, why are there currently 7 copies of this function in the > Emacs sources? Dunno. I probably wouldn't have added them. OK, so we have 7 definitions of a trivial function. How many occurrences of those 7 functions? Do their uses really benefit from defining such a function? (How about just replacing all of them by sexps?) > No-one said it's vitally important; it's just a minor nice-to-have. Just 1 opinion: too minor and not nice enough to have. > > Is it hard to understand (eq (not a) (not b))? > > Is evaluation of that inefficient? Is it too > > verbose? What's the motivation for all of this? >=20 > Same reason proper-list-p was added: reducing existing code duplication > and providing yet another convenience function for those that like it. I see. You added `proper-list-p' also. Also missing from Common Lisp, FWIW. How much real code duplication did adding that predicate eliminate? At least in that case the code replaced is, even if straightforward and not very verbose, not completely trivial. I don't object strongly to adding such functions. But I'd expect a convenience function to typically be more convenient - replace more than a few occurrences of more complex code.