Subject: Re: bug#76132: Clojure-style auto-gensyms for macros

From: Tassilo Horn <[email-masked]>
Date: Sat, 08 Feb 2025 09:29:04 +0100

Eli Zaretskii <[email-masked]> writes:

>> Would there be interest in adding something like that to Elisp?
>
> I'm very hesitant to extend the Emacs Lisp language with such
> features, when this can be had for a price of a simple function call.
> We have enough magic names and punctuation characters already, and
> they get in the way of code readability.

In my opinion, readability is the key point of the feature.  With the
regular "declare the locals you need to introduce beforehand and then
splice them into the expansion" approach, the distinction between locals
and spliced-in macro args gets lost.  With the suggested
with-uninterned-symbols macro, it's clear that foo$ is a local defined
in the expansion while ,foo is something from "the outside".

I'm not booked on the $-suffix, though.  It's just easy to type, stands
out a bit and usually isn't used in the wild.

Bye,
Tassilo