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: Emanuel Berg
Subject: Re: Lisp files that load cl-lib in problematical ways
Date: Fri, 20 Oct 2023 05:02:14 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii wrote:

>> The "levels" introduced in this discussion are, it would
>> seem
>> 
>>   - files that are used by vanilla Emacs that use cl-lib
>>   
>>   - such files that use it at compile time
>> 
>>   - such files that use it a run time
>> 
>>   - such files that are loaded when Emacs is executed with
>>     no arguments
>> 
>> but - what is the difference? I think it is pretty clear
>> that cl-lib is used quite broadly, probably because people
>> find it useful.
>> 
>> So what does it matter if it is "purged" from one or
>> several of these levels? What gain is there if that
>> is achieved?
>
> It matters to us because we decided long ago to avoid
> loading cl-lib at runtime in vanilla Emacs.

But as we have seen in practice it _is_ loaded, be it by the
debugger, by native compilation, or any other package or piece
of Elisp that uses it, or uses something else that is using
it. It is all interconnected, and because it is used so much
already, using Emacs in practice implies having cl-lib loaded
at run time.

> There are several good reasons: bloat, unnecessary namespace
> pollution, etc.

People use it because it is useful: there is `cl-loop',
`cl-incf', `cl-decf', `cl-pushnew' and many others examples of
that. Those are not complicated to use, they are all prefixed
with cl- (as we see) and have good docstrings.

> But all this is not really relevant for the code that you
> (or any one of us) write for their own personal use, it is
> only relevant to code contributed to Emacs.

But we don't know what people who are starting to write Elisp
today for their personal use go on to contribute to Emacs
packages that make it to the ELPAs, or core Emacs for that
matter. That whole distinction does not make any sense to me.
If it is harmful, which it isn't, no one should use it and it
doesn't matter in what context, be it personal use, ELPA
packages, core Emacs, compile time, run time - what does
it matter?

On the other hand if it _is_ useful - and the number of people
using it and the number of files where it is used, and the
number of occurrences indicate that it is - there is no reason
to disencourage people from using it, anywhere.

You, and everyone else writing Elisp for that matter, are of
coures equally permitted not to use it, if they consider it
harmful, it just shouldn't be labeled detrimental as a policy
with really no good arguments supporting that claim that we
have seen thus far at least.

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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