emacs-devel
[Top][All Lists]
Advanced

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

Re: seq.el and the complexity of Emacs Lisp.


From: Philip Kaludercic
Subject: Re: seq.el and the complexity of Emacs Lisp.
Date: Mon, 06 Nov 2023 06:51:42 +0000

Richard Stallman <rms@gnu.org> writes:

> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
> I looked at seq.el to try to get an idea what those functions do.  It
> was difficult to get this from the doc strings, because it wasn't
> explicitly stated which ones are for users and which ones are
> internal.  Eventually I got somewhat of an idea. 
>

[...]

> I expect that they are slower at run-time, because each seq- function
> needs to do the generic dispatch for each call.  Is that correct?

Yes, I believe this has been empirically verified on multiple occasions.

[...]

> Could we replace all the cl-lib sequence function calls with seq-
> calls, in core and GNU ELPA code?  Seq is simpler and cleaner, so that
> would be an improvement.  We could keep cl-lib permanently for
> compatibility for external code, but it would not need to be loaded
> (into Emacs or your brain) very often.

Cl-lib would still be used, because it provides more than just functions
to operate on sequences.  There are a number of macros (cl-flet,
cl-loop, cl-incf, ...) and functions (cl-map accepting multiple lists,
cl-subst) that are frequently used and to my recollection to not yet
have analogous replacements in seq.



reply via email to

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