[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [External] : Re: Shrinking the C core
From: |
Emanuel Berg |
Subject: |
Re: [External] : Re: Shrinking the C core |
Date: |
Sun, 17 Sep 2023 11:13:42 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Alfred M. Szmidt wrote:
>>> We have them in Elisp as well, `cl-remove-if' and
>>> `cl-remove-if-not', both in cl-seq.el.
>>
>> A partial emulation of some Common Lisp functions is
>> present in the cl-lib library, for emulation purposes.
>> It is not supposed to be used a lot.
>
> And if there are functions or features that make sense from
> Common Lisp, they can always be added piecemeal. There is no
> need to make Emacs Lisp complicated for the sake of
> compatibility with Common Lisp.
I don't know why cl-lib was added to GNU Emacs and Emacs Lisp,
maybe it was, as you say, for emulation purposes and for the
sake of compatibility with Common Lisp. But the way it is used
today, as we just heard in 28% of vanilla Emacs files, isn't
because of CL emulation or compatibility purposes, but because
it adds useful features and covers aspects that non-cl-lib
Elisp leaves blank.
For functions like `cl-incf', where there is no corresponding
"incf" [I don't know whatever happened to it or why it was
dropped, or maybe it wasn't ever there before cl-lib?] one
could setup aliases or simply drop the "cl-" prefix (and set
an "cl-incf" alias to the new "incf" as not to break existing
code).
Then, for functions like `cl-defun' and `defun', one would
examine if those could be merged into a new "defun", with the
CL features brought over, e.g. the default &optional argument
value syntax. Here one would again use aliases to cover
the back.
For functions that cannot be merged because they are
inherently different, if such cases exist, one would keep the
"cl-" prefix and the incompatible non-cl-lib Elisp function.
But one could also just leave it the way it is! Since those
prefixes are hardly a big problem. And especially not compared
to all the good features cl-lib brings to our game.
--
underground experts united
https://dataswamp.org/~incal
- Re: [External] : Re: Shrinking the C core, Arthur Miller, 2023/09/13
- Re: [External] : Re: Shrinking the C core, Emanuel Berg, 2023/09/15
- Re: [External] : Re: Shrinking the C core, Richard Stallman, 2023/09/16
- Re: [External] : Re: Shrinking the C core, Alfred M. Szmidt, 2023/09/17
- Re: [External] : Re: Shrinking the C core,
Emanuel Berg <=
- Re: [External] : Re: Shrinking the C core, Alfred M. Szmidt, 2023/09/17
- RE: [External] : Re: Shrinking the C core, Drew Adams, 2023/09/17
- Re: [External] : Re: Shrinking the C core, Emanuel Berg, 2023/09/18
- Re: [External] : Re: Shrinking the C core, Richard Stallman, 2023/09/19
- Re: [External] : Re: Shrinking the C core, Richard Stallman, 2023/09/19
- Re: [External] : Re: Shrinking the C core, Emanuel Berg, 2023/09/19
- Re: [External] : Re: Shrinking the C core, Eli Zaretskii, 2023/09/19
- Re: [External] : Re: Shrinking the C core, Richard Stallman, 2023/09/21
- Re: [External] : Re: Shrinking the C core, Eli Zaretskii, 2023/09/17
- Re: [External] : Re: Shrinking the C core, Emanuel Berg, 2023/09/17