Hi Michał, Thanks for the explanation. I hadn't made the connection between the fact that defrecord creates a "proper" java type and the fact that a Java class would need to be :import-ed. I agree that creating a make-huss function might be simpler. Part of me is thinking "why don't I fall back on defstruct and defmulti, at least until performance becomes important" so I might do that.
Cheers, Chris On 7 September 2010 22:46, Michał Marczyk <michal.marc...@gmail.com> wrote: > Types created by deftype & defrecord are Java classes and you'd have > to use :import to bring them into another namespace: > > (ns ... > (:import my-project.other.huss)) > > Or if you have multiple types, > > (:import [foo.bar Wibble Wobble]) > > It might be simpler to define a factory function and use that (through > :use / :require): > > ;; in my-project.other > (defn make-huss [x y z] > (huss. x y z)) > ;; ...then use make-huss in project.core > > Sincerely, > Michał > > -- > 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<clojure%2bunsubscr...@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 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