[CLJ-1324] Allow leading slashes in unqualified symbol names Created: 15/Jan/14 Updated: 02/Aug/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.
|Comment by Andy Fingerhut [ 01/Aug/14 9:26 PM ]|
Paavo, a commit made to Clojure master earlier today causes your patch clj-1324-1.patch to no longer apply cleanly. I haven't investigated in detail, but it might be straightforward to update the patch so that it applies cleanly again.
|Comment by Paavo Parkkinen [ 02/Aug/14 7:37 PM ]|
Attached updated patch.
|Comment by Andy Fingerhut [ 02/Aug/14 8:40 PM ]|
It would be less confusing if you could name the patches differently, or remove the older one.