When generated symbols are used in clojure?

90 Views Asked by At

When is it appropriate to use generated symbols(varname#) in clojure? What are the specific examples?

1

There are 1 best solutions below

2
On BEST ANSWER

They are mostly used in macros so that the symbols you defined in macro doesn't conflict with the symbols that are defined in the same lexical scope when the macro is called. Using auto generated symbol would allow to avoid this kind of conflict (this concept is AKA hygienic macros).