From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: What's missing in ELisp that makes people want to use cl-lib? Date: Fri, 10 Nov 2023 23:17:32 +0200 Message-ID: <4b3eacb7-9b0b-7167-d9ef-4d06167b5411@gutov.dev> References: <871qd8sfdx.fsf@posteo.net> <838r7g8pys.fsf@gnu.org> <87bkcbrgnr.fsf@posteo.net> <25924.21015.19614.951576@orion.rgrjr.com> <87bkc4jpja.fsf@dataswamp.org> <12da6bcb-1818-7fbe-12af-8d4607724332@gutov.dev> <87il6bt4z0.fsf@yahoo.com> <87y1f6s3eb.fsf@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30379"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cc: Alan Mackenzie , =?UTF-8?Q?Bj=c3=b6rn_Bidar?= , emacs-devel To: Po Lu , =?UTF-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 10 22:18:35 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1r1Ytd-0007ip-Tp for ged-emacs-devel@m.gmane-mx.org; Fri, 10 Nov 2023 22:18:34 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r1Yso-0007ew-0i; Fri, 10 Nov 2023 16:17:42 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r1Ysl-0007dz-2S for emacs-devel@gnu.org; Fri, 10 Nov 2023 16:17:39 -0500 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r1Ysj-0001W1-3q for emacs-devel@gnu.org; Fri, 10 Nov 2023 16:17:38 -0500 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id BD5785C028E; Fri, 10 Nov 2023 16:17:35 -0500 (EST) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 10 Nov 2023 16:17:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gutov.dev; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1699651055; x=1699737455; bh=PYKbOp3ExH3tJaLzqt81FThVdr2zWvjLw3c vhPtyjfw=; b=cwO0Rd4HT16Xp0LLzKKM74kXjxgnATV7Ry+RkpkUd/8/dD6oB3H LzdsjCtwSDendTIaN00a7zaXZ4rHdeS02eY+PF6Vsk2nU/4oHw4QcCBkwyliiCMi HApVdDyR9wkzFcfUr5RGUwRF4vF7sSuzsIW18K/EKgFXnzuMgyL+fnazCUrLoGHG d1vrBa83RnigchMswMsIe8qRgEJRYmeMQxq5bWF5t6POgFKA6BJGaW3260DS5cyQ rCk9O04rB8Rgz+kpRBKakBT3Zo0kHPPj97jY2kKssonWQzmPR+IpfSfGxBb8gQDS cFlHTPUIgFB4wN7Msg5vmVip9/6XBpXJNrQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1699651055; x=1699737455; bh=PYKbOp3ExH3tJaLzqt81FThVdr2zWvjLw3c vhPtyjfw=; b=VKRH2O1z517585Owk2BYGpH8fchzkVSbJMrLPw8hAViZlm6yLCi rufbHaV416AtHblu084Hv15affHoVj7x61lcwMRfzp3yFLTqx/+mseVPjI+dq1OS eNRdJjQE7jX4KAvCtBMkjdD/04x3qWjbygb+ahalQ4L/2j8Q1i4+zcasWfShvtOQ 8GLY70imuoHEsf3g5Tv5M44g97SJV8qiNoGq7PWmHSWUy1RLIfYvdZEazz0uqvP1 Q7tagAmas9KereroFC5dnckkx0znTK99hEgVwAVP5XHCQZRFCHLZnyx1wDDswsGC c6x0MSMDnX4Rh5RZQH8INH+q7ASQ9CZz4cg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedruddvfedgudeggecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttdefjeenucfhrhhomhepffhm ihhtrhihucfiuhhtohhvuceoughmihhtrhihsehguhhtohhvrdguvghvqeenucggtffrrg htthgvrhhnpeeigfetveehveevffehledtueekieeikeeufeegudfgfeeghfdulefgfeev ledvveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe gumhhithhrhiesghhuthhovhdruggvvh X-ME-Proxy: Feedback-ID: i0e71465a:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 10 Nov 2023 16:17:33 -0500 (EST) Content-Language: en-US In-Reply-To: <87y1f6s3eb.fsf@yahoo.com> Received-SPF: pass client-ip=66.111.4.28; envelope-from=dmitry@gutov.dev; helo=out4-smtp.messagingengine.com X-Spam_score_int: -60 X-Spam_score: -6.1 X-Spam_bar: ------ X-Spam_report: (-6.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, NICE_REPLY_A=-3.265, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:312505 Archived-At: On 10/11/2023 05:17, Po Lu wrote: >> Hmmm, a bit vague, no? Humor me: if it's really so easy and so >> readable please write out your preferred equivalent of, say >> >> (cl-set-difference l1 l2) ; hopefully obvious, like l1 - l2 in python > (let ((list nil)) > (dolist (x l1) > (unless (member x l2) > (push x list))) > (dolist (x l2) > (unless (member x l1) > (push x list))) > list) Just to take this example, there are about 2 major bugs: 1) the list will come out reversed, 2) the code does XOR rather than subtraction. To be clear, this is not to take a dig at your coding ability (which I'm convinced is quite high), but rather to make a point about the potential for problems when one uses lower-level tools and has to reinvent the wheel.