On Wed, Nov 3, 2010 at 5:37 AM, Stuart Sierra <the.stuart.sie...@gmail.com> wrote: > Protocols provide just one thing: polymorphic functions. They are not > intended to provide "type" or hierarchy like Java classes / > interfaces.
Well, they also provide a second thing -- a way to bundle multiple functions as something that is required to be implemented together and an easy way to test whether all of those required functions are implemented. So the original poster has a valid point. If you don't always want to require them as a bundle, you get better reuse and composition out of having one protocol per function. But this proliferation of protocols can be a little awkward to manage with the current scheme. -- 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