So I'm looking at improving the implementation of generic functions, preparatory to making the library more generally available. One thing I ought to do, I think, is make a Java class, GenericFunction, a sibling to MultFn. GenericFunction's role is basically the same as MultiFn's, it just has a different approach to dispatch.
Now, of course I could write GenericFunction in Java, just as MultiFn is written in Java, but I thought it would be nice to use Clojure's Java interop features to do it. I haven't tried using gen-class before, though, and things are going a bit haywire. Maybe someone can point out where I've gone wrong. Some code and other diagnostic info is below. Let me know what else I need to provide. (ns xg.gf) (gen-class :name xg.gf.GenericFunction :extends [clojure.lang.AFn] ) user> (compile 'xg.gf) java.lang.ClassNotFoundException: [clojure/lang/AFn] (gf.clj:7) [Thrown class clojure.lang.Compiler$CompilerException] user> (. System (getProperty "java.class.path")) "/usr/local/clojure/trunk/clojure.jar:/usr/local/clojure/clojure- contrib/trunk/clojure-contrib.jar:...:/Users/mikel/Valise/guild/trunk/ software/clojure" caeneshluura:clojure mikel$ pwd /Users/mikel/Valise/guild/trunk/software/clojure caeneshluura:clojure mikel$ ls ./ xg/ ../ classes/ /Users/mikel/Valise/guild/trunk/software/clojure/xg/gf.clj /Users/mikel/Valise/guild/trunk/software/clojure/classes/xg/gf/ --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---