I'm trying to write an EE schematic capture program in clojure. I'd like to be able to define a prototype component, say a resistor with value=10k, then be able to instantiate that many times, with each instance having an additional property such as a name string. It's easy to ensure (identical? (proto instance1) (proto instance2)) returns true while in-memory, however I'm not sure how to write this out to disk.
It seems the serialization libraries, print-dup, edn, etc., operate on values, so reading the database back in won't guarantee it's really the same object. I'd like to have the thing defined *once* then instantiated many times, and have this captured in the on-disk version. Am I barking up the wrong tree? ie, given immutable data structures, there's kind of no point in doing this. I'm actually trying to save disk space, so I'd like to be able to refer in a few characters a potentially large structure that was defined earlier. It would also be nice to have this be human readable. Would one of the JSON serializers do this for me? -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.