Read time evaluation support #705
Unanswered
shantanu-sardesai
asked this question in
Feature Requests & Ideas
Replies: 1 comment
-
|
I think we can add this as an issue to our backlog for the moment. Turns out the purpose is primarily for:
user=> (pr-str (sorted-set 1)) ;; The result of this expression when passed to `read-string` won't give back the same data structure.
"#{1}"
user=> (binding [*print-dup* true] (pr-str (sorted-set 1)))
"#=(clojure.lang.PersistentTreeSet/create [1])"
;; ...
user=> (pr-str #'read)
"#'clojure.core/read"
user=> (binding [*print-dup* true] (pr-str #'read))
"#=(var clojure.core/read)"
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently, unlike the Clojure reader, jank can't evaluate code at read time.
Clojure:
jank:
Honestly I've not been able to find any documentation on this behaviour in the Reader conditional docs of Clojure.
Other than the first place I saw this behaviour mentioned:
Beta Was this translation helpful? Give feedback.
All reactions