Actually since you are using def, I believe your method registrations are 
global. You should be using binding with dynamic vars to get thread locals. 
Also with mine, since I have the user specify the pluralfn symbol and since 
it can be called in another namespace, the namespace of the pluralfn is 
preserved. You can define multiple pluralfn's with the same name but in 
different namespaces. I don't think you can do that with your 
implementation. All this harping from me is really nothing though. Just 
details. Your approach well describes the point you are trying to make with 
little code. (Although you can remove the anonymous fn call in the 
update-in line, update-in accepts fns and the args it will pass to it :-P ).

Back to details though, I think that we still specify too much. For 
example, I think to make this more flexible and performant, we must not 
specify the data structure we choose to use. A vector may not provide the 
best data structure for fast lookup as we would like in a multimethod 
imitator. Also, when we reload a namespace, do we clobber all 
implementations? or save them? 

Probably some sort of protocol would be best, but I don't know what that 
approach should look like.

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