emacs-devel
[Top][All Lists]
Advanced

[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: T.V Raman
Subject: Re: What's missing in ELisp that makes people want to use cl-lib?
Date: Wed, 15 Nov 2023 17:33:22 -0800
User-agent: Gnus/5.13 (Gnus v5.13)

Emanuel Berg <incal@dataswamp.org> writes:

And to make things concrete, take a look for example at some of the good
uses of cl-loop  within the emacs codebase itself, eg eww.el.

Many of those idiomatic uses would I suspect be  not as elegant  (for
some measure of elegance) without cl-loop

> Sebastián Monía wrote:
>
>> 1. This kind of thread is more "scary" to potential Emacs
>>    contributors than any degree of complexity in cl-lib.
>>    I can confirm that.
>
> Very true! It is alienating to newcomers but also to
> experienced people who have solved problem with cl-lib in
> Emacs and saw no problem with that, on the contrary, they used
> what they thought was the best way to do it.
>
>> 2. There's a lot of vague arguments for and against the
>>    library that, as an semi-outsider, read more like
>>    stylistic preference. Sometimes familiarity, or lack of
>>    it. Few objective reasons for/against.
>
> Again, true. In particular, what is lacking is whatever the
> alternative would be. If cl-lib has increased the general
> complexity, fine, maybe that is a problem to some. But surely
> it is totally impractical to kick it out and for the vast
> majority of the places where it is used we can't make the case
> not using it will improve the quality of that code on
> a case-by-case basis.
>
>> 3. Anyone interested in writing code for Emacs has to make
>>    the leap to a Lisp (elisp, in this case) which is already
>>    quite alien to a large population. For non-programmers,
>>    the problem is indistinguishable from learning any other
>>    language. Even for most people familiar with software
>>    development, cl-lib is the least of their difficulties.
>
> Very true, there is no huge leap from Elisp not including
> cl-lib to Elisp including cl-lib. If used well, cl-lib will on
> the contrary reduce the complexity and make the code cleaner.
> And in very complicated cases, as we have seen with some
> examples of `cl-loop', it is not clear in any way that
> re-writing that in any other style would reduce complexity.
> On the contrary `cl-loop' can be seen as a handy frame where
> all that complexity, when encountered, is neatly organized
> and accessible.
>
> At the very least, the people who used cl-lib and cl-loop and
> every thing else cl- that they used, they didn't agree that
> use was detrimental to anything, style or functionality.
> And they solved their problems! In general, we should trust
> them, and in particular, we should absolutely not alienate
> them or anyone else for no reason other than style issues that
> other people have on their contributions to Emacs.
>
> We shipped the library, people used it, that's the situation.

-- 



reply via email to

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