From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: What's missing in ELisp that makes people want to use cl-lib? Date: Sat, 11 Nov 2023 09:23:26 +0800 Message-ID: <87il69qe0h.fsf@yahoo.com> 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> <4b3eacb7-9b0b-7167-d9ef-4d06167b5411@gutov.dev> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9219"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= , Alan Mackenzie , =?utf-8?Q?Bj=C3=B6rn?= Bidar , emacs-devel To: Dmitry Gutov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 11 02:24:46 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 1r1cju-0002DL-7n for ged-emacs-devel@m.gmane-mx.org; Sat, 11 Nov 2023 02:24:46 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r1cj3-0000qg-UL; Fri, 10 Nov 2023 20:23:54 -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 1r1ciz-0000qM-FV for emacs-devel@gnu.org; Fri, 10 Nov 2023 20:23:50 -0500 Original-Received: from sonic317-33.consmr.mail.ne1.yahoo.com ([66.163.184.44]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r1cir-0007Ez-SO for emacs-devel@gnu.org; Fri, 10 Nov 2023 20:23:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1699665816; bh=YbTCjf9nnhXWvApTp5hmXlU323Y10+dqruI6yZk/tqU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=lshgIqF5bwLpKFQSUdkTjwcy21Uo0jj+9OoNg4xSKkhhJjkkLGbBqrWD2C9M8oI2QSrCyHKuGAtMh21LVGqm2cg9hQlKy2b4W67UMmCvU3r+e/Zq44YiDM5WvEl9UFdSTpnAGvYHJgUL2Jrk2LXKfgY2VkvyIzK1dksyod3h17dhQkCvS1dgMAoSU+/Rfd0s+gHYoSg3GQ2y9FIakZqJu/ImwgiGwrF3Tl4UfmyYMrYE1y30yZRODFpjdku+6yKmuGvP/VG2ftJrdSESKgFOLZ0tfZlv43A8IV/POGEHWvzD5ipYM5Nt68DKN7YgpAd1hZzo8ItqLCsa2jzG7Be1Qg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1699665816; bh=QczNZZC4e4ruM8mhM6sgsZhu8vYfHCYFeTw2Nkz+rK5=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=Kdmfl8ogF8ITdElikZKuxGAi65DKMAjNoUF64J1s2TzZhuykR/iT994/nv5ygyos3ytDZoadszOqp97n8zi4ZlgGUc24tCdP64C1uRBi6g8fWy/1G9J7BeIGVsZxHsdJgzR9G4ekfum9yiZ4Mq0M3niRlvU4SvIlfwxIVBNTsokkV6UO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4a563 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic317.consmr.mail.ne1.yahoo.com with HTTP; Sat, 11 Nov 2023 01:23:36 +0000 Original-Received: by hermes--production-sg3-8696d769c6-46q4z (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 1e4c82832bbea8781f2452dc41ae128c; Sat, 11 Nov 2023 01:23:31 +0000 (UTC) In-Reply-To: <4b3eacb7-9b0b-7167-d9ef-4d06167b5411@gutov.dev> (Dmitry Gutov's message of "Fri, 10 Nov 2023 23:17:32 +0200") X-Mailer: WebService/1.1.21896 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.184.44; envelope-from=luangruo@yahoo.com; helo=sonic317-33.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=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:312517 Archived-At: Dmitry Gutov writes: > 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. Hmm, reading its doc string, I think a more illustrative name for cl-set-difference would be cl-set-complement. In this case, the second loop can be removed. If the order is significant (it seldom is), the list can be nreversed afterwards. Or alternatively a local variable can be maintained holding the last cdr of the list, and insertion performed on that instead.