Why are final variables with a hash symbol in macros?

I watched the clojure.coremacro implementationand , and I noticed that some of the bindings letin the macros of the source file end with their variable name s and octotorp ( #).

Upon further inspection using the following code ...

(defn foo# [] 42)
(foo#) ; => 42

... I realized that octotorp is just a valid symbol (at least when it is turned on at the end).

So my question is: why do these core macros end their required characters with a hash symbol? Is there any specific implied meaning or convention that I'm missing here?

+4
source share
1 answer

# gensym.

(gensym "foo")
;=> foo3

(defmacro hygienic []
  `(let [foo# 42] foo#))

(hygienic)
;=> 42

(macroexpand '(hygienic))
;=> (let* [foo__1__auto__ 42] foo__1__auto__)
+3

All Articles