[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Some improvements for cl-flet
From: |
Michael Heerdegen |
Subject: |
Re: Some improvements for cl-flet |
Date: |
Thu, 14 Oct 2021 06:00:15 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
akater <nuclearspace@gmail.com> writes:
> > Is there a good reason to support cl-symbol-macrolet at all?
> > It is a bizarre construct.
>
> People largely agree that with-slots is beneficial, for example.
> with-slots wouldn't be possible without symbol-macrolet.
I must say that at first I hated Richard's comments, but now I tend to
agree.
Most of our uses of `symbol-macrolet' are about places. Like
`with-slots'. So you can do (setf var expr).
But does the provided syntax have to look exactly like that? Having
setting a variable change some place as side effect is slightly bizarre
indeed. We could provide the same feature offering a syntax like
(setf (place) expr)
where `place' is a local (normal) macro that "returns" a reference to
the according place. Makes a bit more sense, conceptually. With other
words: we could provide the same using `cl-macrolet' instead of
`symbol-macrolet'.
The only really different example is `thunk-let', a kind of lazy let I
already mentioned. But (docstring): "It is not allowed to set
`thunk-let' or `thunk-let*' bound variables." So there variable
abstraction also doesn't fit so well in that case.
I don't think we should remove `cl-symbol-macrolet', but I have the
impression that all current uses in Emacs could well work without symbol
macros.
Michael.
- Re: Some improvements for cl-flet, (continued)
- Re: Some improvements for cl-flet, Stefan Monnier, 2021/10/10
- RE: [External] : Re: Some improvements for cl-flet, Drew Adams, 2021/10/10
- Re: Some improvements for cl-flet, Richard Stallman, 2021/10/11
- Re: Some improvements for cl-flet, João Távora, 2021/10/11
- Re: Some improvements for cl-flet, Richard Stallman, 2021/10/12
- Re: Some improvements for cl-flet, Po Lu, 2021/10/11
- Re: Some improvements for cl-flet, Robin Tarsiger, 2021/10/11
- Re: Some improvements for cl-flet, Richard Stallman, 2021/10/12
- Re: Some improvements for cl-flet, Richard Stallman, 2021/10/09
- Re: Some improvements for cl-flet, Richard Stallman, 2021/10/09
- Re: Some improvements for cl-flet,
Michael Heerdegen <=