The problem with the protocols approach is that it leads to an explosion in the number of explicitly defined records. His example was only with labels, but I can imagine he might have borders and any number of other decorations on the widgets, in which case he would need something like
(defrecord Textfield ...) (defrecord LabelledTextfield ...) (defrecord BorderedTextfield ...) (defrecord LabelledAndBorderedTextfield ...) ; and so on for each combination of decorator and widget With the other approach he would only need a record for each widget and one for each decorator. -- 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