On Jun 15, 12:41 pm, Christian Schuhegger <christian.schuheg...@gmail.com> wrote: > Ah, sorry, perhaps I misunderstand you, but if you use multimethods > (defmulti) in Clojure you do not need to "attach" methods to anything. > The defmulti will allow you "dispatch-on-type" based on the key which > is present in the map (e.g. if :delete is present or if :insert is > present). > > The nice thing about multimethods the lisp style is that they are > additive, e.g. you do not have to change anything in your op > structure.
A very good point. I think it would be overkill here, but you're absolutely right that multimethods would be an elegant way to do it if I went that route. Another aspect I need to get used to considering, moving from OO :/ -- 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