[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What's missing in ELisp that makes people want to use cl-lib?

From: Eli Zaretskii
Subject: Re: What's missing in ELisp that makes people want to use cl-lib?
Date: Sun, 29 Oct 2023 08:10:15 +0200

> Date: Sat, 28 Oct 2023 14:03:29 -0700
> Cc: stefankangas@gmail.com, rms@gnu.org, rogers@rgrjr.com, emacs-devel@gnu.org
> From: Jim Porter <jporterbugs@gmail.com>
> Is there any benefit in aliasing macros like this to non 'cl-FOO' names 
> anyway?

I don't have an opinion on this, so I'll let others chime in.  In
general, introducing aliases has a minor downside: people will need to
learn two names instead of just one.

> I see that 'cl-progv' is in cl-macs.el, so I guess that's not relevant. 
> 'cl-mapc' is in cl-extra.el, which I suppose is relevant here?

Yes, cl-extra is just another part of cl-lib.

> I find it very helpful, but I'd be happy with any function/macro
> that would make it easy to iterate over multiple sequences at once.

Try looking in seq.el or map.el.

> 'cl-remove-if' should be easy to replace with 'seq-filter' or somesuch. 
> Likewise 'cl-list*' with 'nconc'. I know there's some controversy around 
> 'cl-loop' (I'm not a big fan myself), and I've thought about adding some 
> new hooks to Eshell that would probably obviate the need for 'cl-loop' 
> (which is used in em-extpipe.el).
> So in conclusion, I guess the relevant functions that I care about are 
> 'cl-mapc', and to a lesser degree 'cl-incf'/'cl-decf'. Everything else 
> could go away if we wanted to avoid them.

Since seq.el is preloaded, I think we should prefer it to cl-lib.
Likewise map.el, although that isn't preloaded.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]