On Fri, Nov 13, 2009 at 8:50 PM, Mark Engelberg <mark.engelb...@gmail.com>wrote:

> Rich, thanks for the extended explanation of the overlap between the
> old and new constructs; I found this explanation much clearer than
> what is currently on the wiki.  Basically, the key for me was
> realizing that these new constructs are all you're likely to need as
> long as you are just programming "in Clojure" and not worrying about
> Java interop.
>
> A related question I have is to better understand the
> overlap/relationship between multimethods and the new protocols.  At
> first glance, they seem fairly orthogonal.  If you have something that
> dispatches only on type, or corresponds to a Java interface, use a
> protocol, otherwise use multimethods.  However, I notice that one
> thing protocols give you is the ability to batch function requirements
> and say, "these functions need to be implemented together".  It seems
> to me like there is just as much value to being able to include
> multimethods as part of such a requirement of things to implement
> together.  So would it make sense for multimethods to be included as
> part of protocols, or should there be some similar grouping system for
> multimethods?


Since a multimethod maybe used where any Clojure function may be used, and a
Clojure function may be used to implement a protocol, can't multimethods be
used to implement (part or all of) a protocol?

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