On Wed, Jul 7, 2010 at 2:42 PM, Meikel Brandmeyer <m...@kotka.de> wrote: > Hi,> > Am 07.07.2010 um 15:47 schrieb Pedro Henriques dos Santos Teixeira:>
>> Are there any design guidelines for choosing between defrecords and >> defstruct, when one wants a map with type? >> >> I started with defrecord, but feels like I should switch to defstruct >> to avoid these complex host integration issues. > > You should stay with defrecord. It will replace defstruct eventually. There > are no complex host integration issues. It's just that you have to understand > how clojure compiles code and that what you want to do requires you to > qualify your classname. Is there a reason, why you can't put the defrecord > simply before the testing? > Thanks for the feedback. I actually decided to stay with defrecord as well --> already seeing the benefits of extending protocols later on. There is no problem for this particular testing use case, but I was a bit worried that a function might eval differently accordingly to how it was called. But then I realized that's alright and it's totally fine in the lisp world. By the way, is anyone aware of any way to destroy a class that was generated? Situation is that I might have dynamically generated records. They may be no longer used, in these cases, it might make sense to remove the generated bytecode and unload from classloader. cheers, Pedro -- 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