Currently one can't send vars around in edn. #' is clojure reader specific. 'variable' may or may not be general enough to justify #var in edn, else #clojure/var could work. Objective is just to transmit var identity and bind to same-named var on reading side (a la var serialization support). Printing would need to prn #var instead of #' (perhaps via a flag), and edn/read tables for Clojure need to include var reading
Currently one can't send vars around in edn. We are working on adding the capability to transmit var identity and bind to the same-named var on the reading side. Rich made some
changes recently (they are in 1.9.0-alpha16) for doing this in Var with Java serialization. Additionally, we are currently working on adding a var tagged literal for the same purpose. This would not be part of edn as vars may not have meaningful semantics in other languages, but rather a tagged literal specific to Clojure. The format will look like:
#clojure/var clojure.core/conj
The read side of this is pretty straightforward. The area where we are seeking more feedback is in printing. Currently vars print in one of two ways:
#'clojure.core/conj - seen in most cases
#=(var clojure.core/conj) - when printed with *print-dup* true (probably almost no one ever sees this)
The question is what the print format should be in various contexts:
1) with print-dup - switch to #clojure/var (preferable to using read eval)
2) without print-dup, in the REPL - ???
3) without print-dup, outside the REPL - ???
4) other context I'm not thinking of
The existing #' reader macro will of course remain so the read-side changes are purely additive. Is anyone relying on the #' printing for things that would not be satisfied by #clojure/var? Obviously the new format is more verbose and thus it might be preferable to print the #' form in the REPL.
Thanks.