Thanks Luc and Stuart for your answers.

I will try to make my protocols more orthogonal than hierarchical in order to 
make them fit this philosophy.


On 2011-08-28, at 3:43 PM, Stuart Sierra wrote:

> Hi Alexandre,
> 
> Clojure Protocols do not support inheritance. This was a design choice. 
> Protocols are more than just Java interfaces because they can contain method 
> implementations for pre-existing classes. Inheritance would make the call 
> site caching in the implementation of protocols more complicated. 
> 
> You can achieve the same thing by simply extending your types to both 
> protocols.
> 
> -Stuart Sierra
> clojure.com
> 
> -- 
> 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 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

Reply via email to