emacs-devel
[Top][All Lists]
Advanced

[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: Sun, 12 Sep 2021 01:32:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hello akater,

I'm having problems to understand what you want to do and why.

I see that a binding like (f (x y z)) is ambiguous.  But isn't that a
minor problem?  Who ever wants to define a local function that always
just returns nil?  Ok, it can happen, very rarely, but then

  (f (x y z) nil)

works and is much better readable.

> Given all this, I think ~(func exp)~ should be dropped from ~cl-flet~.

And I don't understand why this minor annoyance justifies such a radical
measure, unless I misread that.  I'm often using that syntax.

> My patch (already discussed with Stefan Monnier to some extent)
> introduces function ~cl--expand-flet~ which retains the functionality
> currently provided by ~(func exp)~, in an unambiguous way.  I suggest to
> move it there, away from ~cl-flet~.

Now I'm even more confused: do you suggest to factor the code somehow?

Or would I have to use `cl--expand-flet' instead of `cl-flet' in the
future to get the same behavior as now?  That would be strange.

Sorry if I'm missing something.  It would be helpful to see a patch or
some code, even if it is just a draft.


Michael.




reply via email to

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