On Sun, Jul 1, 2012 at 10:31 AM, Michał Marczyk <michal.marc...@gmail.com> wrote: > Additionally I would like to note that Haskell's ad hoc polymorphism > solution, the system of type classes, allows for extensions predicated > on a type class already being implemented: > > -- no dependencies on other type classes > instance SomeClass SomeType where > ... > > -- depend on OtherClass being implemented > instance (OtherClass a) => SomeClass a where > ...
This is pretty interesting. This could address the issues around knowing exactly which protocols you need to implement in order to get map-like functionality for example. (defprotocol ILast :where [IIndexed] ...) So this expresses dependency w/o inheritance. David -- 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