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?

Regarding partial implementation, Rich and a couple others have
suggested that the ability to merge together maps of implementations
basically gives you partial implementation.  But it seems to me that a
lot of times, several interface functions will share some sort of
local state, using closures.  If I'm visualizing this correctly, these
sorts of partial implementations couldn't possibly be mixed-in,
because there would be no way to share that state.  Off the top of my
head, I don't yet have a concrete example of this -- has anyone
encountered this yet in their experiments with protocols?

--Mark

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