> That syntax is already used for defrecords.
>
> Clojure 1.4.0-beta2
> user=> (defrecord Foo [a b])
> user.Foo
> user=> (read-string "#user.Foo[1 2]")
> #user.Foo{:a 1, :b 2}
> user=>
>
>
Technically, there is no space with that method. As it is currently
implemented, tags are separated by a
On Sunday, March 18, 2012 9:07:54 PM UTC-4, Brent Millare wrote:
>
>
> this form is still unreadable by default, but with tagged literals, allows
> users to define custom reader behavior per class.
> #java.class.name [args*]
>
>
That syntax is already used for defrecords.
Clojure 1.4.0-beta2
use
So to answer my own question, this is in 1.4.0.
Here is an example:
(binding [*data-readers* {'user/f (fn [x] (java.io.File. (first x)))}]
(read-string "#user/f [\"hello\"]"))
returns
#
On the best way to pass types around, though, I still think this is an open
question.
The problem is t