[CLJ-1324] Allow leading slashes in unqualified symbol names Created: 15/Jan/14 Updated: 10/Feb/14
|Affects Version/s:||Release 1.5|
|Patch:||Code and Test|
The proposal is to allow the reader to accept symbol names with leading slashes.
Problem: Leading slashes are frequently useful, e.g. in mathematical operators like "/" or "/="
Currently, only "/" is allowed as a special case, and is used for the division operator in clojure.core
This could be extended to allow all symbols to have names starting with a leading slash.
There should be no ambiguity with namespace-qualified symbols:
Optionally, it also would be possible to allow multiple slashes after the leading slash in a name. This would allow symbols such as "/src/main/clojure" to become valid.
|Comment by Paavo Parkkinen [ 10/Feb/14 7:32 AM ]|
Attached patch to allow leading slashes in symbol names.
The patch changes the regexp pattern used to match symbols to accept characters after a slash in symbol names.
Tests pass, and the patch also adds a couple of new special cases to the symbol tests.