Timothy Baldridge <tbaldri...@gmail.com> writes:
>>From clojure.org/protocols : " > > if one interface is derived from the other, the more derived is used, else > which one is used is unspecified." Oh dear, that's not so hot. I guess it's the first that gets tested, and that this is undefined. > Since multi-methods use "isa?" and not "=" perhaps use multi-methods and > specify order via "prefer-method"? I used simple multi-methods (with a "class" based dispatch function). But then, my tests suite moved from taking 30seconds to taking 5minutes, when a downstream API introduced some new interfaces (with no other functional changes AFAICT). I am still using multimethods but in a way which subverts the (unreplaceable) isa? call, and my tests suite is taking 15 seconds. I was investigating protocols as an alternative. Phil -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.