[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Installing cond* in core
From: |
Richard Stallman |
Subject: |
Re: Installing cond* in core |
Date: |
Mon, 29 Jan 2024 22:58:34 -0500 |
[[[ 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. ]]]
> After careful consideration and off-line discussions between Eli and
> myself, we have come up with the following proposed plan:
> 1. We will install cond* in core and let people who prefer it use it,
> while people who prefer pcase are free to keep using pcase.
> 2. cond* vs pcase is to be considered a matter of stylistic preference.
> 3. There is no intention to forcibly replace pcase with cond* in our
> code.
I think that is a good plan.
I would not propose to eliminate pcase, or obsolete it, because that
would break things and there is no good reason to do that.
> In general, there is no point to loading something early unless it is
> used early. Do you have something more specific in mind?
If people use it where they wish, it will get used in some files that
are loaded early. Putting it in emacs-lisp should not require any
special effort. I think the code generated by `cond*' calls only
C-level primitives, except in one special case.
That special case is when the `rx' construct is used and match
subsequences are extracted as strings. Then it generates calls to
`match-string' which is in subr.el. It won't be hard to avoid regexp
matching in code loaded that early. Indeed, I would be surprised to
see any use for it at that point.
There should be no need to preload cond* because it defines no
run-time support. All its work is done at macroexpand time.
Perhaps there will be an issue about using it in *non-compiled* files
that are loaded early. Is any such file complex enough to want to use
constructs such as cond* or pcase?
--
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
- Re: Installing cond* in core, (continued)
- Re: Installing cond* in core, Dmitry Gutov, 2024/01/28
- Re: Installing cond* in core, Richard Stallman, 2024/01/29
- Re: Installing cond* in core, Eli Zaretskii, 2024/01/28
- Re: Installing cond* in core, Alan Mackenzie, 2024/01/28
- Re: Installing cond* in core, Eli Zaretskii, 2024/01/28
- Re: Installing cond* in core, Richard Stallman, 2024/01/29
- Re: Installing cond* in core, Emanuel Berg, 2024/01/28
Re: Installing cond* in core, Stefan Monnier, 2024/01/27
Re: Installing cond* in core, Emanuel Berg, 2024/01/28
Re: Installing cond* in core,
Richard Stallman <=