emacs-devel
[Top][All Lists]
Advanced

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

Re: Lisp files that load cl-lib in problematical ways


From: Björn Bidar
Subject: Re: Lisp files that load cl-lib in problematical ways
Date: Thu, 19 Oct 2023 20:47:05 +0300
User-agent: Gnus/5.13 (Gnus v5.13)

Alan Mackenzie <acm@muc.de> writes:

> Hello, Eli.
>> > I fear that that's the way things will stay, because it would be too
>> > much work to fix.  But more because there are enough contributors who
>> > think that cl-lib is just an ordinary part of Emacs to be used freely
>> > without restraint.  I am not among this group of contributors.
>
>> We cannot possibly expect people to contribute code if we force them
>> not to use the macros they are used to.  If cl-lib is not loaded as
>> result, that is good enough for us, I think.
>
> We "force" them to use Emacs Lisp, but they still contribute.  The
> problem is that use of cl- makes maintenance of other people's code much
> harder, at least for me.  I'm sure I'm not alone.
>
> cl- probably multiplies the size of the Lisp language parts of Elisp
> (i.e. things like defun, defmacro, if, while, cond, ...) by around three.
> I'm not able to learn all these fancy macros which are used rarely enough
> not to be learnable, but frequently enough to cause maintenance headaches
> - every time I encounter `if-let' and the like, it just stops me in my
> tracks.  I either have to guess what it means, which makes me
> uncomfortable, or laboriously consult a doc string, if any.
>
> Yes, I know if-let isn't a cl- function, and its doc string is of
> reasonable quality.  Many cl- functions don't have doc strings, or have
> inadequate ones, however.
>
> There was a time in the medium past when the use of run time cl- was not
> allowed.  Emacs was then, from my point of view, much easier to maintain.
> At some stage this rule was done away with, but I don't recall there
> being any discussion on emacs-devel about this change.  There should have
> been such discussion.
>

I think if people find cl- useful there are reasons for that.
That code changes, things get harder to read if one doesn't know the new
code is normal I think.

Resisting against change, doesn't seem like the best option to me.
But the only change that is necessary from my point of view is that the
documentation is on par.

As someone that is new in lisp programming I found that these shortcuts
that macros like these allow make things easier but in sometimes harder
to understand what's going on.



reply via email to

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