On Mar 10, 5:31 pm, kurtharriger <kurtharri...@gmail.com> wrote: > That was basically my question, protocols are designed for this but > ILookup isn't a protocol. Is it possible to make ILookup into a > protocol? I haven't looked at the java code much at all, but I might > take a stab at creating a patch it that seems possible. > > Converting java.util.Properties into a map isn't hard, but converting > java objects to native maps is extreamly common (bean, reflect, ring, > etc...) and perhaps unnecessary in many situations if one could just > extend an existing java type with ILookup so that if it looks like a > duck, its a duck.
I've had the same idea a couple of day ago; specifically, looking up public members of an object. In the end, I think the actual use cases generally are more involved than just :keyword lookup, so I wrote some code to automatically do the conversion to map: https://github.com/joodie/clj-java-fields -- 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