[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#27177: 26.0.50: Macroexpanding cl-loop and friends (make-symbol usag
bug#27177: 26.0.50: Macroexpanding cl-loop and friends (make-symbol usage)
Sat, 03 Jun 2017 18:24:36 -0600
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)
Stefan Monnier <address@hidden> writes:
>> Stefan, why did you make the switch? Using cl-gensym would help a ton
>> with readability of cl-loop's macroexpansion.
> I don't consider human-readability of the result to be something that
> a macro should have to pay attention to.
I can understand that when talking about smaller macros, but loop is a
fairly complex macro, so I believe human-readability is a desirable
trait to have if feasible. It would help with debugging and overall
understanding of cl-loop.
I've browsed around for a few common loop implementations and they all
use gensym (CCL uses gentemp) and descriptive naming:
ABCL (admittedly they adapted it from SBCL):
I also found a CHICKEN Scheme egg for CL's loop, and it uses gensym (but
generic names, unfortunately).
If there's a good reason to not use gensym, then that's fine, but if the
problem is easy enough to work around (perhaps per-expansion counter so
that it will never realistically hit most-positive-fixnum), then I think
cl-loop should use it.