From: Heime via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: Tomas Hlavaty <tom@logand.com>
Cc: Jean Louis <bugs@gnu.support>, help-gnu-emacs@gnu.org
Subject: Re: Advantage using mapc over dolist
Date: Tue, 03 Dec 2024 20:12:42 +0000 [thread overview]
Message-ID: <sRRSVXldpKQP9pmA5S4SQVV_JFh37XTDQGCckCL2Prif8G8XZJ5K70tb1UpC1aZniqPjaYuBYSsdAmzI1Hjzt50aRRQ9s7Ci46d42yGbJXM=@protonmail.com> (raw)
In-Reply-To: <87r06o4joh.fsf@neko.mail-host-address-is-not-set>
On Wednesday, December 4th, 2024 at 8:04 AM, Tomas Hlavaty <tom@logand.com> wrote:
> On Tue 03 Dec 2024 at 22:24, Jean Louis bugs@gnu.support wrote:
>
> > > > 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.
>
>
> Maybe the issue is that too many things were degraded into cl-*.
> And now very complex bad ideas are pushed as replacement fix.
>
> > > > But within Emacs, I like using Emacs Lisp pure
>
>
> 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.
For me, it should all be lisp.
> "Emacs Lisp pure" had CASE and ECASE in 1993 (conversion to RCS
> according to git) until 2012 iirc.
>
> > 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.
>
>
> Bad workarounds do not fill me with joy.
>
> > > Anytime I process complex
> > > data recursively, I reach for labels. There does not seem to be an
> > > alternative, does it?
> >
> > I have no idea about it, let me see what AI says:
>
>
> That AI is not good enough.
> The examples are too trivial to justify labels.
>
> This function has a structure which does justify labels:
>
> (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)))
>
> > So I would say, I would not get frustrated, rather just make an alias
> > for me and use `labels' wherever I wish and want.
>
>
> This does not address the problem.
>
> In my Elisp code, I simply require cl-lib, add those cl- prefixes where
> needed and live with the result.
>
> 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-* ;-)
next prev parent reply other threads:[~2024-12-03 20:12 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-01 23:31 Advantage using mapc over dolist Heime via Users list for the GNU Emacs text editor
2024-12-02 6:26 ` Tomas Hlavaty
2024-12-02 18:30 ` Heime via Users list for the GNU Emacs text editor
2024-12-02 20:41 ` Tomas Hlavaty
2024-12-02 20:50 ` Jean Louis
2024-12-02 21:21 ` Tomas Hlavaty
2024-12-02 21:41 ` Heime via Users list for the GNU Emacs text editor
2024-12-03 6:13 ` Jean Louis
2024-12-03 7:36 ` Tomas Hlavaty
2024-12-03 19:24 ` Jean Louis
2024-12-03 20:04 ` Tomas Hlavaty
2024-12-03 20:09 ` Jean Louis
2024-12-03 20:12 ` Heime via Users list for the GNU Emacs text editor [this message]
2024-12-03 20:24 ` Jean Louis
2024-12-02 20:56 ` Heime via Users list for the GNU Emacs text editor
2024-12-03 19:26 ` Jean Louis
2024-12-03 19:39 ` Heime via Users list for the GNU Emacs text editor
2024-12-03 14:11 ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-12-03 14:48 ` Tomas Hlavaty
2024-12-03 16:31 ` Stefan Monnier
2024-12-03 17:00 ` Alfred M. Szmidt
2024-12-03 17:24 ` Stefan Monnier
2024-12-03 19:27 ` Tomas Hlavaty
2024-12-03 19:35 ` Heime via Users list for the GNU Emacs text editor
2024-12-03 14:59 ` Tomas Hlavaty
2024-12-03 15:40 ` Tomas Hlavaty
2024-12-03 15:57 ` Tomas Hlavaty
2024-12-03 17:11 ` Eli Zaretskii
2024-12-03 17:33 ` Tomas Hlavaty
2024-12-03 17:40 ` Eli Zaretskii
2024-12-03 17:55 ` Tomas Hlavaty
2024-12-03 18:05 ` Heime via Users list for the GNU Emacs text editor
2024-12-03 18:57 ` Alfred M. Szmidt
2024-12-03 19:06 ` Heime via Users list for the GNU Emacs text editor
2024-12-03 20:15 ` Tomas Hlavaty
2024-12-04 5:37 ` Alfred M. Szmidt
2024-12-03 19:42 ` Jean Louis
2024-12-03 19:54 ` Heime via Users list for the GNU Emacs text editor
2024-12-03 20:11 ` Jean Louis
2024-12-03 16:47 ` Stefan Monnier
2024-12-03 18:01 ` Heime via Users list for the GNU Emacs text editor
2024-12-03 20:05 ` Jean Louis
2024-12-03 20:35 ` Tomas Hlavaty
2024-12-03 23:29 ` Stefan Monnier
2024-12-04 0:57 ` Heime via Users list for the GNU Emacs text editor
2024-12-04 2:20 ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-12-03 19:38 ` Jean Louis
2024-12-04 4:56 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-12-02 6:59 ` Tassilo Horn
2024-12-02 10:12 ` Michael Heerdegen via Users list for the GNU Emacs text editor
2024-12-02 17:03 ` Heime via Users list for the GNU Emacs text editor
2024-12-02 18:51 ` Tomas Hlavaty
2024-12-02 20:17 ` Heime via Users list for the GNU Emacs text editor
2024-12-02 21:07 ` Tomas Hlavaty
2024-12-03 13:19 ` Tomas Hlavaty
2024-12-02 21:15 ` [External] : " Drew Adams
2024-12-02 21:58 ` Tomas Hlavaty
2024-12-02 22:42 ` Drew Adams
2024-12-03 5:49 ` Tomas Hlavaty
2024-12-03 20:08 ` Lazy functional programming [was: Advantage using mapc over dolist] Drew Adams
2024-12-03 21:17 ` Tomas Hlavaty
2024-12-04 4:33 ` Advantage using mapc over dolist Michael Heerdegen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='sRRSVXldpKQP9pmA5S4SQVV_JFh37XTDQGCckCL2Prif8G8XZJ5K70tb1UpC1aZniqPjaYuBYSsdAmzI1Hjzt50aRRQ9s7Ci46d42yGbJXM=@protonmail.com' \
--to=help-gnu-emacs@gnu.org \
--cc=bugs@gnu.support \
--cc=heimeborgia@protonmail.com \
--cc=tom@logand.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).