Howard, I didn't read all of your post because frankly, I'm lazy, but David is correct that you will run into difficulties with hot protocol on protocol action. However, I personally think there are excellent reasons for wanting to extend protocols on protocols and fellow Revelytix-ian David McNeil developed a technique to do so and documented it here:
http://david-mcneil.com/post/3495351254/clojure-protocol-adapters https://github.com/david-mcneil/clojure-adapt There was a discussion about this on -dev at one point and David offered the code if someone wanted to put it in contrib but there was strong apathy for doing so. Alex On Oct 28, 2:38 pm, David Powell <djpow...@djpowell.net> wrote: > On Fri, Oct 28, 2011 at 6:46 PM, Howard Lewis Ship <hls...@gmail.com> wrote: > > From my perspective, defprotocol appears to create a name (in the > > > current namespace) as well as a Java interface (the real type). It > > feels to me like I should be able to pass either the interface or the > > protocol into extend-type and have it Just Work. Is there some concern > > I'm missing here? Thoughts?# > > I think the problem is that you are trying to extend one protocol to another > protocol. I don't think you are supposed to do this. For one, it would > only work against deftypes that had compile-time support for the protocol > (ie that physically implemented the interfaces), and would fail for deftypes > and other instances that implemented the protocol dynamically. > > I think protocols are designed to be orthogonal, and you should just extend > both protocols to the class. > > -- > Dave -- 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