Welcome! Please see the About page for a little more info on how this works.

+1 vote
ago in Syntax and reader by

The Clojure reference states that a slash may occur only once in the middle of a symbol ( https://clojure.org/reference/reader#_symbols ), yet, the core symbol function permits symbols with leading slash non-conformingly ( https://clojuredocs.org/clojure.core/symbol#example-542692d5c026201cdc3270a0 ), and there has been the following thread here: https://ask.clojure.org/index.php/1510/allow-leading-slashes-in-unqualified-symbol-names .
Is there any more info available why only a single slash is allowed in the middle, and if either leading slashes may eventually be allowed or the symbol function be made conforming?

ago by
The `symbol` function is conforming in the sense that it works with everything that's explicitly allowed. The fact that the set of values that don't result in an error is wider than the explicit domain of the function does not mean anything, really. And it definitely won't be changed as it could break some code completely unnecessarily.

1 Answer

+1 vote
ago by

There are no plans to widen what is allowed in symbols.

The symbol function supports things wider than the spec for the same reasons keyword does which are outlined at https://clojure.org/guides/faq#unreadable_keywords - in short, programatic use and performance.

...