Hi, Am 30.12.2011 um 20:34 schrieb Marshall T. Vandegrift:
> Another option I've been making use of for exactly this situation is to > use the #= reader macro to evaluate the Class/forName at read-time. > Something like: > > (extend-protocol MyProtocol > java.lang.Integer (action [x] "Integer") > #=(Class/forName "[B") (action [x] "ByteArray")) > > It may not be ideal stylistically, but lets you use extend-protocol in > such situations. The “right” thing is probably allowing strings as well in extend-protocol. It is allowed in several other places like gen-class or type hinting. So it seems consistent to allow also (extend-protocol "[B" …). Sincerely Meikel -- 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