>
>  The fly in the ointment is: what happens if both
> protocols specialize frob? Then Clojure will complain that it can't
> tell which method to call. In order to resolve that problem, we must
> use prefer-method to declare that one protocol or the other is
> preferred.
>
> But what if I want to make another thing:
>
> (make-thing {:models [::thing]
>                   :protocols [::idea ::thing]
>                   :inits {:name "test-thing2" :number 2}})
>

make-thing could tag your thing with a runtime tag and define a prefer on
this runtime tag.

--~--~---------~--~----~------------~-------~--~----~
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
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to