On Thu, Dec 23, 2010 at 8:51 AM, Jay Fields <j...@jayfields.com> wrote: > Ken said: > "That seems sucky. What about adding a priority parameter to your > defmethod-analogue? The predicates are kept sorted by priority." > I disagree. To use your terms, I think your solution is equally "sucky".
It most certainly is not. Unlike cond clauses, methods might be scattered in different parts of a large code base; and the order in which the files in that code base are compiled might end up making a difference here. That really is ugly. The priority based version has the nice property that its behavior is determined purely by the contents of the defmethods; not their locations and, potentially, the order in which files are compiled. And of course my code added a couple of other nice features as well. -- 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