On 1/27/11 7:24 PM, Ken Wesson wrote:
On Thu, Jan 27, 2011 at 6:24 PM, Mark Engelberg
<mark.engelb...@gmail.com> wrote:
Records don't have serialization yet, do they?
user=> (defrecord Foo [n])
user.Foo
user=> ((supers Foo) java.io.Serializable)
java.io.Serializable
Looks like they do.
I've been serializing/serializing records in my current project quite a
bit. The one caveat is that for java to serialize the record a class
file needs to be compiled for the record. In my case that just meant I
had to introduce AOT via leiningen (which does complicate things TBH).
While this serialization has been fine for most of my needs I have quite
often wanted to be able to use *print-dup* since binary serialization
seemed overkill in those cases. Hopefully something like defrecord2
gets added to clojure at some point to make dealing with records more
pleasant.
-Ben
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en