help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Advantage using mapc over dolist


From: Heime
Subject: Re: Advantage using mapc over dolist
Date: Tue, 03 Dec 2024 18:01:42 +0000

On Wednesday, December 4th, 2024 at 4:47 AM, Stefan Monnier 
<monnier@iro.umontreal.ca> wrote:

> > I respect your preference and understand that you as pcase author would
> > prefer it everywhere. But whoever renamed case and ecase did not
> > respect other peoples preferences and people are now forced to use that
> > pcase monstrosity even in very simple cases.
> 
> 
> I'm also the renamer of `case/ecase`, yes. 🙂
> 
> This was not done to discourage people's use of it, actually the
> reverse. Yes, I know it sounds counter intuitive

Your statement that it is counter intuitive does actually result in difficulties
to users.  Instead, things should be clear, so users can easily decide when to 
use one form and when the other, or if there is no difference alone.

> , so let me explain:
> Richard was strongly opposed to the use of the CL package because of its
> "stepping" all over the ELisp namespace. For years, this manifested
> itself in the fact that use of CL within Emacs's own code was generally
> shunned and tolerated only with (eval-when-compile (require 'cl)),
> meaning that you could use CL only when it could be compiled away during
> byte-compilation (by macro-expansion and/or inlining). So you could use
> `ecase` but not `some`.

This discouragement seems to have remained present.  Users looking at the cl-*
also wonder in what situations would they use them and when to use the elisp
ones.  One cannot find a clear discussion about this in the manual, in a way
that a user can make the suitable decision about which to use. 

> While some people were happy because they consider that ELisp is better
> off without those Common Lisp constructs, many others were annoyed, and
> it imposed obstacles to the inclusion of some packages into Emacs.
> 
> Finally in Emacs-24.3, we reached a compromise which was to introduce
> CL-Lib, which is like CL except all the functions/macros are prefixed
> with "cl-". By its nature as a compromise, everyone both lost and won
> at the same time.

The question is whether people can use the cl-* ones freely or not.  Are 
there scenarios when you don't want to use them but use the elisp ones instead?

One thing I still have difficulty about is how the usual  lisp is discouraged
when elisp is supposedly normal lisp for use with emacs configuration. But
has evolved into something else.

 
> Note that if you really really hate using these extra three letters, you
> can still (require 'cl). It's deprecated and may be removed from Emacs in
> some future release, but it's a very simple library so you can keep your
> own copy (and we may even put it up on GNU ELPA anyway).
> 
> 
> Stefan



reply via email to

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