Hey Dimitris,
I think what you're running into here is a fundamental
misunderstanding of protocols. Specifically, this is not true:
As I understand it, protocol extensions are namespace-specific.
In Clojure, protocol extensions are global. If you extend a
protocol for a type then it doesn't matter which namespace calls
the protocol function, it only matters what type the function is
called on. Protocols are approximately interfaces in Java, except
they can have implementations added to existing types at runtime.
With your current code, I am a little bit confused why you want to
use a protocol. You have a multimethod which performs dispatch
based on a key, but which then calls the same protocol function
for each dispatch value - why not just call the appropriate
function in the right namespace? The protocol seems to be
attempting to add a second level of indirection, but it's not
clear to me how or why that is useful.
Carlo
--
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 unsubscribe from this group and stop receiving emails from it, send an email
to clojure+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/clojure/87blt3k4e4.fsf%40gmail.com.