> (defrecord MyRecord [x y z] > (make-record [arg1 arg2 arg3 ...] ...)) > > (make-record MyRecord arg1 arg2 arg3 ...)
This construct is not very good. make-record is not first-class (It cannot be used as an argument to a function). Its first argument is not first-class (it has to be statically the name of a class). It exposes an implementation detail to client code (the name of a class). If you really wanted to add constructors, I would think of a make-MyRecord function or a multimethod as in your first post, or even both, rather than that. -- 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