GNU bug report logs -
#72344
[PATCH] Add a version of cl-once-only which handles lists of forms
Previous Next
Reported by: Thuna <thuna.cing <at> gmail.com>
Date: Sun, 28 Jul 2024 21:18:02 UTC
Severity: wishlist
Tags: patch
Done: Sean Whitton <spwhitton <at> spwhitton.name>
Bug is archived. No further changes may be made.
Full log
Message #11 received at 72344 <at> debbugs.gnu.org (full text, mbox):
Hello Thuna,
On Sun 28 Jul 2024 at 11:17pm +02, Thuna wrote:
> Attached is the macro `cl-once-only*', which takes a symbol which is
> bound to a list of form (such as those contained in a `&rest args' in
> `defmacro') and binds that variable to a list of symbols where each
> symbol is bound to the result of evaluating (in order) the corresponding
> form. The docstring provides an example which might illustrate what it
> does better then I did here.
>
> I don't expect this to be used too often but it could be somewhat handy
> in macros with a `&rest args' which are supposed to be evaluated.
>
> (My motivation for this is to use this macro in another patch which I
> didn't want to make longer with out-of-scope additions. If this is
> considered not worth polluting the `cl-' namespace over I can just write
> the forms by hand so it's fine either way.)
I'm the author of cl-once-only. I'm interested in macro-writing macros
in the CL tradition.
To be honest, cl-once-only* seems quite esoteric. Could you perhaps
show me a direct comparison between some cl-once-only code and how it is
made more readable by cl-once-only*? That seems to me to be the key
criteria.
Also, I wonder if a name like cl-list-once-only would be better.
Thanks!
--
Sean Whitton
This bug report was last modified 94 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.