[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: |
Mon, 13 Sep 2021 02:14:20 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
akater <nuclearspace@gmail.com> writes:
> > I see that a binding like (f (x y z)) is ambiguous. But isn't that a
> > minor problem?
>
> No. Syntax ambiguity is always a huge inconvenience.
I see your point. OTOH, removing the expression syntax case would be a
backward incompatible change potentially break existing code - right?
> Even if I fail at convincing anyone that it should be dropped, I do
> wonder if this was indeed a Scheme influence.
A code example (to illustrate what cases we talk about) could look like:
#+begin_src emacs-lisp
(cl-flet ((multilinep (apply-partially #'string-match-p "\n")))
(pcase something
((and (pred stringp) (pred multilinep)) ...)
...))
#+end_src
It's useful to be able to bind the result of some expression to a
symbol's function binding. AFAIR I was one of those who wanted
`cl-flet' to support this, and I had not been inspired by Scheme much.
Personally I wouldn't mind when this functionality would be provided by
some other form, but there is backward compatibility. And don't you
think that cl-lib (see Stefan's answer) differs from CL much more in
other aspects?
You can find discussions about to which degree cl-lib should be kept an
as strict as possible emulation of Common Lisp in the emacs dev and/or
bug mailing lists. There were different opinions. Undoubtedly the main
purpose of cl-lib today is just for writing Emacs Lisp code, however.
Michael.
- Some improvements for cl-flet, akater, 2021/09/11
- [PATCH] Some improvements for cl-flet, akater, 2021/09/23
- Re: [PATCH] Some improvements for cl-flet, akater, 2021/09/23
- Re: [PATCH] Some improvements for cl-flet, João Távora, 2021/09/24
- Re: [PATCH] Some improvements for cl-flet, and some more, akater, 2021/09/24
- Re: [PATCH] Some improvements for cl-flet, and some more, João Távora, 2021/09/24
- Re: [PATCH] Some improvements for cl-flet, and some more, Lars Ingebrigtsen, 2021/09/24
- Re: [PATCH] Some improvements for cl-flet, and some more, João Távora, 2021/09/25
- Re: [PATCH] Some improvements for cl-flet, akater, 2021/09/24
- Re: [PATCH] Some improvements for cl-flet, Lars Ingebrigtsen, 2021/09/26