I tried defining a Unicode data-literal tag, and was surprised to find that it throws an error:
(defn wrap-λ [expr]
`(fn [~'%] ~expr))
(set! *data-readers*
(assoc *data-readers*
'λ #'wrap-λ))
(read-string "#λ(inc %)")
;; => Execution error (ArrayIndexOutOfBoundsException) at lib/eval74486 (REPL:15).
;; Index 955 out of bounds for length 256
955 is the Unicode codepoint for \λ, and the error suggests it only supports the ASCII range.
The first few lines of the stacktrace:
LispReader.java: 840 clojure.lang.LispReader$DispatchReader/invoke
LispReader.java: 285 clojure.lang.LispReader/read
LispReader.java: 216 clojure.lang.LispReader/read
LispReader.java: 205 clojure.lang.LispReader/read
Is this expected behavior? Clojurescript does not have the same issue:
(cljs.reader/register-tag-parser! 'λ wrap-λ)
(cljs.reader/read-string "#λ(inc %)")
;; => (cljs.core/fn [% & args] (inc %))