From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Heime via Users list for the GNU Emacs text editor Newsgroups: gmane.emacs.help Subject: Re: Advantage using mapc over dolist Date: Tue, 03 Dec 2024 20:12:42 +0000 Message-ID: References: <87zflevbwm.fsf@neko.mail-host-address-is-not-set> <87frn5lswe.fsf@neko.mail-host-address-is-not-set> <875xo1lr1q.fsf@neko.mail-host-address-is-not-set> <87mshdrze6.fsf@neko.mail-host-address-is-not-set> <87r06o4joh.fsf@neko.mail-host-address-is-not-set> Reply-To: Heime Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34269"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Jean Louis , help-gnu-emacs@gnu.org To: Tomas Hlavaty Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 03 21:13:28 2024 Return-path: Envelope-to: geh-help-gnu-emacs@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 1tIZGx-0008mF-Qz for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 03 Dec 2024 21:13:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIZGS-00012O-Jp; Tue, 03 Dec 2024 15:12:56 -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 1tIZGP-00011v-S6 for help-gnu-emacs@gnu.org; Tue, 03 Dec 2024 15:12:53 -0500 Original-Received: from mail-43167.protonmail.ch ([185.70.43.167]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tIZGN-00047l-Cz for help-gnu-emacs@gnu.org; Tue, 03 Dec 2024 15:12:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1733256768; x=1733515968; bh=BGPLQCWCi6xdhIXVUplxWWSQ3B7EkYuE2xcaqYl7NPs=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=U14PpQplfn5iINvAQOlYGXpAnKTPZrkDbOyXyhYcBorSzpkuuIihTBZ0bbC1HZnu8 ntDj+GeVngpNRcoeuo7V7+zcLop7Vtk97NZVZhs6P/BvflMM14AhPeLM6MPx99CGZa VcO1tA9p/qszn2uq4WaTOVpQS8YF898/mfZ/Zv7AJGgtULZjdI6KHStLN94a3sCte0 pAIDRMkdkvkmLIivEaZ9hec1j9W6ycXTw5w6+6pKV/F28gxmYNJMsXmV4Y1J0exJBi 4trDtNZapiylPrJj0YDrvD0BEVmC3wMmBEFjIqAqKedQGc4uP8kbSBugHB6V+92QFl tfYAPfRAg/XmA== In-Reply-To: <87r06o4joh.fsf@neko.mail-host-address-is-not-set> Feedback-ID: 57735886:user:proton X-Pm-Message-ID: 6dd48ea9cbc61698da3f28f447465076085a3c99 Received-SPF: pass client-ip=185.70.43.167; envelope-from=heimeborgia@protonmail.com; helo=mail-43167.protonmail.ch 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_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:148565 Archived-At: On Wednesday, December 4th, 2024 at 8:04 AM, Tomas Hlavaty = wrote: > On Tue 03 Dec 2024 at 22:24, Jean Louis bugs@gnu.support wrote: >=20 > > > > I am an Emacs Lisp programmer, and all Common Lisp functions > > > > prefixed with `cl-` I find liberating in the sense that personally > > > > within Emacs Lisp I do not like mixing it because it is not Common = Lisp. >=20 >=20 > Maybe the issue is that too many things were degraded into cl-*. > And now very complex bad ideas are pushed as replacement fix. >=20 > > > > But within Emacs, I like using Emacs Lisp pure >=20 >=20 > Not sure what does "Emacs Lisp pure" mean. > Does it mean "Whatever comes with Emacs except cl-* stuff."? The cl- prefix seems to indicate this. The commands started to be explicit that they are cl rather than elisp. =20 For me, it should all be lisp. =20 =20 > "Emacs Lisp pure" had CASE and ECASE in 1993 (conversion to RCS > according to git) until 2012 iirc. >=20 > > But Tomas, I mentioned nothing about pcase. I said cl- namespace being > > separate feels liberating to me as my personal choice. If you wish to > > use those commands without cl-prefix, there is solution that Stefan > > wrote in recent email. >=20 >=20 > Bad workarounds do not fill me with joy. >=20 > > > Anytime I process complex > > > data recursively, I reach for labels. There does not seem to be an > > > alternative, does it? > >=20 > > I have no idea about it, let me see what AI says: >=20 >=20 > That AI is not good enough. > The examples are too trivial to justify labels. >=20 > This function has a structure which does justify labels: >=20 > (defun parse-rss (dom) > (let (z) > (cl-labels ((link (x) > (when (consp x) > (cl-case (car x) > (link (push (caddr x) z)) > (t (mapc #'link (cddr x)))))) > (rec (x) > (when (consp x) > (cl-case (car x) > (item (link x)) > (t (mapc #'rec (cddr x))))))) > (rec dom)) > (nreverse z))) >=20 > > So I would say, I would not get frustrated, rather just make an alias > > for me and use `labels' wherever I wish and want. >=20 >=20 > This does not address the problem. >=20 > In my Elisp code, I simply require cl-lib, add those cl- prefixes where > needed and live with the result. >=20 > However, here simple and likely pre-CL functions and macros are degraded > to cl-, people are discouraged from using cl- and encouraged to use > something even more bonkers than cl-* ;-)